Why use a hardware wallet.
A hardware wallet stores signing keys on a physical device that never connects to the internet. When MyAlgo needs to sign a transaction, it sends the unsigned transaction to the Ledger; the Ledger displays the transaction details on its screen for your manual approval; you confirm with the device's physical buttons; the Ledger signs internally and returns the signed transaction.
The signing key never leaves the hardware device. Even if your desktop computer is fully compromised, an attacker cannot extract your key — they would need physical access to your Ledger and your PIN. For accounts holding meaningful value, hardware wallet security is the recommended practice. The cost of a Ledger Nano S Plus is roughly $80 (verify current pricing); a Nano X is roughly $150.