Cannot install macOS Mojave on external spinning drive. Error: This Mac can only install macOS on APFS-formatted drives

You are almost there. Check again in Disk Utility app.

Format

You will find APFS as an option in the Format pop-up menu.

Scheme

You make the same choice of GUID Partition in the other pop-up menu Scheme.

screenshot of Disk Utility > Erase > Format > APFS.