Hardware wallets create private keys internally without you connecting to the Internet.
When you connect this USB to the computer and connect to the Internet, you create new private keys using electrum wallet in a secure environment and not offline. you can say cold storage wallet not hardware wallet if you create it with offline PC.
In the hardware wallets the private key does not leave the platform.