This process is called a clean install, which is ironic as there's nothing particularly clean about it: Microsoft has enshittified Windows Setup.
One key technique in the Windows repair playbook involves wiping out everything on the storage device (typically C:\) from which Windows boots and on which that OS resides. Prosaically enough, this ...