Sign in to your Microsoft account at account.microsoft.com
Open your profile settings
Select the option to edit your name
Enter your new name and save the changes
If you mean your Minecraft Java Edition username, go to minecraft.net
Sign in with the Microsoft account linked to Minecraft
Open your profile or account settings
Find the Minecraft Java profile name section
Enter a new available username
Save the changes
Wait for the name change to take effect
If you mean your Xbox gamertag, go to xbox.com or your Xbox profile settings
Choose the option to change gamertag
Enter the new gamertag and confirm it
Check for any name change fees or availability limits
