This process is called a clean install, which is ironic as there's nothing particularly clean about it: Microsoft has enshittified Windows Setup.
Microsoft has been making it tougher and tougher to perform a clean install of Windows without a Microsoft account. And it’s about to get even harder. Windows 11 22H2, which is set to roll out later ...