There are different hardware wallets. It can be a protected flash drive, then anything you want can be stored there. The point is that access to data is carried out only after entering a password. All data is encrypted. If the password is lost, then access to the data is also lost.
But there are also dedicated hardware wallets that have physical buttons. I think they store the wallet software. Probably nothing else can be written there. But I am not sure of my words, I have never had such a wallet.