Hello, thank you for reaching out to Microsoft Q&A.
To completely factory reset your PC, boot your PC in the Windows System Recovery Environment (WinRE):
- Start your device and wait for the Windows logo (or the manufacturer's logo) to appear
- As soon as the Windows logo appears, press and hold the power button until the device shuts down
- Turn your device on again and repeat step 2
- Turn your device on a third time. Windows should display the Automatic Repair screen
- Select Advanced options > Reset this PC > Remove Everything, then proceed with a local reinstallation.
Note: Running system recovery will reset your PC to factory defaults and completely wipe all data on your HDD.
If you forgot your password, select the "I forgot my password" option and follow the prompts to reset it. In this way, you can save all of your documents on the disk.