You can trigger a factory reset using your console without needing a computer or USB drive. Simply:
Press the Steam button to open the main menu. Select Settings. Select System. Scroll down to Advanced section near the bottom of the page. Choose Reset to Factory State. Toggle on Reinstall SteamOS if you're troubleshooting. Confirm your action.
Your Steam Deck will begin preparing the device for the reset, and after that it'll wipe your device. The process takes around 10-15 minutes depending on how much data you have stored. If you have a microSD card inserted, the factory reset shouldn't touch it, but it's best to take it out before starting anyway. Also, you'll need an internet connection to reinstall SteamOS after the reset.
Resetting your Steam Deck will erase everything saved to your internal storage and take the device back to the state it was in out of the box. So, if you're just trying to fix an issue and not preparing the device for a new owner, it's best to go through all available troubleshooting methods like restarting the device, checking for a pending software update or rolling back to a previous SteamOS version if you think an update caused the problem. Lastly, in the case that you're just preparing your Steam Deck for a new owner, toggle off Reinstall SteamOS. It's faster and wipes only your personal data.