I bought Minecraft today and I have to create a Microsoft account. I'm logged in in the browser and have already redeemed the key, but when I try to log in to the Minecraft program, my password is wrong…
Minecraft Java Edition or Minecraft Bedrock Edition?
Java
When signing in, did you make sure you selected Microsoft Account and not Mojang Account?
If you have actually selected a Microsoft account, the best thing to do is to double-check that the login details you have in mind are correct. For example, by logging into your MS account in another browser or on another device.
Or maybe the problem was directly with Microsoft
https://www.golem.de/news/teams-office-xbox-dynamics-authentifizierungsfehler-nimmt-microsoft-dienste-offline-2103-154972.html