Well Windows 10 at least lets you create a local user account. you can’t even install windows 11 without having a microsoft online account, because you need a Microsoft account to be able to create a local user.
During setup there is a keyboard shortcut to get to command prompt.
Then a command you can use.
Then the machine restarts and you can setup without a Microsoft account.