This process is called a clean install, which is ironic as there's nothing particularly clean about it: Microsoft has enshittified Windows Setup.
Microsoft's KB5077181 security update has caused endless restart loops and system lockouts for Windows 11 users, with no official fix released as of February 13.