How to Format APFS drive using a PC so I can replace my Mac drive? I have an older iMac (Late 2012, A1418) that has a defective hard drive. I need to replace the drive and put in a fresh OS (Catalina).
I have the install media on a USB flash drive. My problem is that the drive needs to be formatted APFS and to do this I need another Mac running High Sierra which I don’t have.
Is there a way to format an external disk to APFS using a PC?
To answer your question, there are good windows software package to read and write to APFS, however you don’t need this and none seem to allow partitioning or setup like you ask.
The stand alone installer knows enough to run Disk Utilty and prep a drive, so you don’t need a formatted drive. When you run the installer it will detect the bare drive and offer to erase, format, partition and install the OS.
Just boot up the installer and connect the new drive. It can be internally connected or externally connected and the installer will do the correct erase and format for you.
Your Mac might even be able to boot to internet recovery to get Disk Utility to partition the disk with zero local bootable OS or installers. Here is a step by step guide that Apple keeps updated for this procedure.

https://support.apple.com/en-us/HT204904