Hey there! Nice to meet you!
Kindly double-check if the account name was typed correctly. Also, if you have not signed in for more than 2 years, your account may have already been deleted/closed due to inactivity.
As stated by Microsoft, accounts that have not been signed in or have been locked for more than 2 years will be deleted due to inactivity, and they can no longer be recovered: https://support.microsoft.com/topic/microsoft-account-activity-policy-7c0a9fa7-0982-b7c6-fd72-df852b63699f
If none of the scenarios above are applicable, the error you are experiencing is an indication that your account was compromised. The hacker was able to remove the account's primary email address/security info and replace it with their own email address, which is why your account is not recognized when signing in.
If the security info has been replaced by the hacker, I'm afraid there is no other working method to recover the Microsoft account, and Microsoft Support cannot help either.
However, I would recommend reaching out to Minecraft Support regarding your Minecraft account if they can provide an alternative option:
https://help.minecraft.net/hc/en-us/request/new?ticket_form_id=360001225811
Thank you for your understanding.
Best regards,
Darhyl