You can change your username on Windows 11 in two ways.
You can sign in with your Microsoft account and then you can change your username by changing your Microsoft account name.
Or you can open the old settings view through the Control Panel. And there, in the User Accounts section, you can change the username.