Hi, I am Dave, I will help you with this.
Where are you seeing the attempts to hack your Microsoft account, is that on the recent activity web page on your Microsoft account online on this link?
https://account.live.com/Activity
if that is where you are seeing it, there is no way for you to stop that, it is some bot online trying to access your account, ensure you have a good long and strong password on your Microsoft account to ensure it cannot be hacked, and it may be a good idea to enable two step verification on your account also, eventually that bot will move on to try to hack someone else's account.