Time Machine – Hard Drive Replacement with SSD; What about non-APFS / APFS?

iMac 27-inch, late 2013, updated macOS

I want to back up my internal hard drive (non-APFS) with Time Machine. Then erase the hard drive. Then, replace the hard disk with a new internal SSD. Then restore from Time Machine.

Should I take precautions for the simultaneous transition from non-APFS to APFS? For example, should I convert the hard drive to APFS before the steps mentioned above?