If anyone with your seed phrase can generate your wallet private keys, what is the advantage of a hardware wallet? When you start using a cryptocurrency hardware wallet, you get to write down a seed phrase in some physical medium (paper, metal, etc.) so you can regain access to your funds if you lose the hardware wallet.

If anyone who gains access to this seed phrase can regenerate your private keys in another wallet and get access to your funds, why use a hardware wallet in the first place? Why not just keep the seed phrase well hidden, remove your data from any wallet app and use the seed phrase to regenerate your keys anytime you need to transfer funds? Is it only a matter of convenience and security when actually transferring the funds?
Well, in both cases, your seed words are ultimately the key to the wallet.

If you use a regular wallet, you open yourself up to a number of other attacks


Malware on the device that runs the software wallet
Keyloggers
People shoulder surfing
Backdoored wallet software


Moreover, larger OSes like Windows, Linux, and Mac OS have considerably larger attack vectors than a hardware wallet. Someone may gain access to your machine through some completely unrelated.

A hardware wallet not only minimizes the attack surface, it also makes use of secure elements (the good ones, anyways), which are specifically designed to prevent exfiltration of things like keys. Most computers do not have similar hardware.

Moreover, since the seed generation happens on the hardware wallet, the seed does not pass through a potentially compromised computer. Of course, one must trust that the hardware wallet is honest, which is why it is better to stick with reputable ones, such as Trezor and Ledger.