there is no strong way to protect hacking but if you keep your private key in offline and if you keep your btc in offline or paper wallet.it can help you to save your wallet.
yes, keep it in the hardware wallet or offline according to also good but using a wallet like that we also have to guarantee our own hardware to avoid viruses that can be the source of the hack