I suggest that you make a full backup of your existing Mac's internal drive. Specifically, not only make a Time Machine backup, but also use a cloning app, like Carbon Copy Cloner, to make a bootable cloned version should something go amiss with the upgrade.
Next, follow the steps in this support article to completely erase and prepare the drive for macOS:
Once that has completed successfully, then follow the steps in this article to install macOS. Alternately, you can choose the Recovery Mode option to elect to install the latest version of macOS that can run on your Mac. That should be <option><command><R>
You should now have a "clean" version of macOS with the drive formatted in APFS. (Note: If the Recovery option did not allow you to install the latest version, you can now retry the upgrade process through System Preferences.)
Finally, you can restore your data from the TM backup.