This process is called a clean install, which is ironic as there's nothing particularly clean about it: Microsoft has enshittified Windows Setup.
If used properly, new features built into Windows 11 offer safe, nearly complete backup, restore, repair, and recovery operations without third-party tools — but there are some caveats worth knowing.
If Command Prompt says Password is incorrect in Recovery or Repair Mode in Windows 11/10, follow these solutions to resolve the issue.