Understanding the difference between a custodial and a non-custodial wallet is crucial for understanding a wallets security.
"A non-custodial wallet (also known as a light wallet) is simply a piece of software on your own computer or phone that puts you in full control of your cryptocurrency holdings. You hold your own private keys, which means no one else is able to make a transaction on your behalf." Meanwhile, if you use a custodial wallet your private key is stored by a third party.
If you are indeed using a hardware wallet than it is non-custodial/light wallet, which is certainly the most secure type of wallet.
Sources:
https://atomicwallet.io/custodial-non-custodial-wallets-comparisonhttps://www.cryptovantage.com/guides/custodial-vs-non-custodial-wallets/https://medium.com/guarda/%EF%B8%8Fcustodial-vs-non-custodial-wallet-s-%EF%B8%8F-benefits-of-light-wallets-87cf701054d1