Let's assume we are using Google Authenticator on an Android device, when a hacker targets your device he can simply inject malware with an app if you download from a third-party website which can steal your 2FA codes without your knowledge.
Android malware can steal Google Authenticator 2FA codesThis is completely possible, but this would again come down to your mistake since you should do your research before downloading apps on the app store. If you end up downloading scammy apps, you are the one at fault since you didn't do your research.
This is why I mentioned earlier that 2FA is pretty much the only security measure you need as long as you are being careful.
This is how I usually secure all my accounts in important sites and have never faced any problems so far despite hackers trying to hack my accounts now and then.
I would say malware is different case here but for sure we can always minimize the possibility of being hacked.
What we can do to protect our accounts:
- having password with complicated password
- not using the same email/password for different accounts
- having 2FA
- double check everything before doing something related to our accounts
Conclusion, the security of our accounts is our own responsibility but of course having 2FA is better than not having it at all.