The simplest setup is to just connect any disk to the Mac and if you don't have Time Machine set up, you will be automatically prompted to use that drive and if it needs reformatting, that is explained. Then once the backups are set, if you are backing up an encrypted Mac to an unencrypted destination, Time Machine automatically prompts to encrypt the drive.
If you like doing things manually, here's more details and explanation that you want an HFS based drive to hold the backup whether you start from APFS or HFS.
For a time machine backup, you cannot use an external disk with APFS. You have to use Journaled HFS+. First, format your external disk as JHFS+ (Encrypted). After that, go to Settings > Time Machine and select your disk. If you have the option, select "Encrypt Backup". This way, your backup will be encrypted. So the answer to your question is neither of them. It is Journaled HFS+ (Encrypted). If you try to use APFS with Time Machine, you'll get the following warning:
Source: Apple - Backup disks you can use with Time Machine (APFS isn't mentioned at all)
macOS Big Sur 11.0
APFS or APFS Encrypted disks are the preferred format for a Time Machine backup disk. If you select a new backup disk that’s not already formatted as an APFS disk, you get the option to erase and reformat it. If the disk is a Mac OS Extended format disk that contains an existing Time Machine backup, you aren’t asked to erase and reformat the disk.
Source: macOS User Guide: Types of disks you can use with Time Machine on Mac