You have several ways to open Command Prompt on Windows 10. How to Format USB Flash Drive/Pen Drive Using CMD on Win 10
If the USB can’t be recognized by computer, you may try some tips to see if you can make it visible on PC before you use Command Prompt to format it.
If the USB flash drive can still be recognized by computer, you can connect it to computer and copy needed files to another device. Note: Disk formatting will wipe all data on the disk.