Windows 10 allows you to change your password or recover it at any time if you forget it.
Microsoft is now mandating the use of a Microsoft account during Windows 11 setup, removing workarounds for local account ...