1)Use the Windows USB/DVD download tool to get a fresh iso form Microsoft, stick it n usb or dvd, 2) boot off whatever you created before 3) Skip putting in a key for now 4) when windows asks for it, ...
If you just mean "factory reset" instead of "format" (you format HDDs, not PCs) then Windows 10 has a built in factory reset function.
Results that may be inaccessible to you are currently showing.
Hide inaccessible results