macOS Disk Utility provides multiple file formats for you to choose from while formatting external hard drives on Mac. The macOS-exclusive APFS and Mac OS Extended also enable you to encrypt the drive. This kind of full disk encryption is software-based.
If you choose APFS encrypted or Mac OS Extended encrypted file format when you format an external hard drive on Mac, it encrypts the drive with a password, you need to enter the password to unlock the drive when you connect the drive to Mac. Hardware encryption just performs encryption and decryption using the device's onboard security.
In addition to encrypting the drive while formatting the disk in Disk Utility, you can also encrypt the external hard drive without erasing, turning on FileVault, or encrypting in Finder. In addition to macOS's built-in encryption tool, you can also choose third-party encryption software for Mac, such applications usually features more personalized options and functions.