Hey there! Nice to meet you!
Based on your description, your Microsoft 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 you received an error that your account is not recognized when signing in.
The only way to recover a hacked account is through the official Microsoft troubleshooter guide:
In case you can't receive the results from the account recovery webform, please submit another recovery request via Incognito/InPrivate window using different devices and network services. Then kindly check your email inbox, junk, and spam folders.
If the account recovery web form doesn't work, and since 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.
Thank you for your understanding.
Best regards,
Darhyl