It is weird that metamask can be hacked because as long as you don't input your private key, it won't be able to hacked.
Are you sure you have never using your private key ? Or is there any peoples who have access of your pc ?
Using hard wallet is safer than using online wallet, maybe next time you can try to using ledger.