Mojang has started to migrate its user accounts to Microsoft accounts. This means that you will need to migrate your Mojang account to a Microsoft account if you want to continue playing Minecraft. Here's how to do it:
Go to the Mojang account migration page: https://account.mojang.com/migrate
Enter your Mojang account email address and click on the "Request a Migration" button.
Check your email inbox for an email from Mojang. It should contain a verification link. Click on the link to continue the migration process.
On the next page, you will be asked to create a Microsoft account or sign in with an existing one. If you don't have a Microsoft account, click on "Create a Microsoft account" and follow the instructions to create one.
If you already have a Microsoft account, enter your login credentials and click on "Sign In".
Once you have signed in to your Microsoft account, you will be asked to link your Mojang account to your Microsoft account. Click on "Link account" to do so.
You will be asked to confirm the migration. Review the details and click on "I Agree" to proceed with the migration.
Once the migration is complete, you will receive an email confirmation from Mojang.
That's it! You have successfully migrated your Mojang account to a Microsoft account. You can now log in to Minecraft using your Microsoft account credentials. If you encounter any issues during the migration process, Mojang has a support page with additional information and troubleshooting tips.