Every wallet address has it's unique private key and if the private key to a wallet address gets compromised, you lose the funds in that address only and not the funds in the entire wallet.
That’s a good point, but it would be more helpful if you could explain why when one of your HD wallet’s private keys gets compromised, it doesn’t mean that all your funds are at risk.
This is why it’s always recommended to use HD wallets (with seeds) instead of relying on a single address (with just one private key). If a private key gets compromised, the rest of your funds are still safe, unlike the case where all your coins are stored in a single address.
(don’t put all your eggs in one basket).