When I click on Login in Minecraft, the message "Login failed, we tried to connect to your Microsoft account, but something went wrong" and the official website thinks that I have not yet installed minecraft
Try reinstalling Minecraft, resetting your password, or both
If you don't want to lose your worlds:
% AppData% \. Minecraft \ saves \
And then make a backup of the "saves" folder
Hi, write an email to the provider where you bought Minecraft. I had this problem myself and the provider simply sent me a new code.