Hi there! Sorry to hear that your Microsoft account was compromised. If the hacker changed the email address or security information on the account and you can no longer sign in, the best next step is to actually complete the Microsoft guide for hacked or compromised account here:
Also, for your privacy and security, I would recommend not posting your full email address, account information, recovery codes, or other personal details publicly in the Community.
As fellow Microsoft Community members, I do not have access to Microsoft accounts or internal records, so I cannot check whether your Gmail address was previously associated with an account or contact you about it directly. The recovery form is the appropriate channel for having Microsoft verify your account ownership.
I hope you're able to recover your account and Minecraft license.