Do not worry while your windows are unable to complete format. You need to fixed these issues first to complete the format
Before format you need to make sure your usb is virus free. Because if your device is infected with a virus then you are not able to complete the formation steps.
Then you have to check the write protection, enable write protection then complete format
You can also choose the command prompt method to format.
For more visit: https://allinsider.net/windows-was-unable-to-complete-the-format/