My general sense from other comments by those with experience is to just skip tinkering with Transmac, as there are issues which tend to come up on the Windows end of things which render making an installer for macOS simply not work. Apple got very particular with how one can install the post-Snow Leopard builds os OS X and macOS.
A question: are you able to boot into anything on the hard drive inside your iMac, or does the hard drive have nothing it can boot into? If you can’t boot into something, then you will probably want to find somebody with a working Mac of whatever age so you can do a direct download of High Sierra.
There are a couple of ways you can then grab a standalone copy of High Sierra: 1) follow
this page’s link to take you to the App Store’s direct download link for High Sierra; or 2) use a feature in dosdude1’s
High Sierra Patcher utility to direct-download the macOS Installer application for High Sierra (under
Tools > Download macOS High Sierra…).
From either of these, you should have the standalone application (the former should be found in the /Applications directory of the Mac onto which you downloaded it; for the latter, the patcher tool method (I’d feel more confident trying first), will download wherever you directed the download tool to save the installer application).
Several of the steps in dosdude1’s patcher instructions can be useful for helping you set up the install for High Sierra on your iMac, even though your iMac doesn’t need any kind of special patching to install High Sierra. Namely, his patcher utility is able to take that downloaded macOS Installer application for High Sierra and set it up it on a bootable USB drive from which you can then use to boot into and install High Sierra on your iMac. Your bootable USB disk needs to be set up with a GUID partition scheme (GPT/GUID) in Disk Utility, and you want to make the one partition an HFS+ with Journalling (or HFS Extended Journalled). Your USB disk/thumb drive should have at least 16GB available to use.
A third method to consider: if you lack have access to a second Mac but do have access to the original, grey DVDs which shipped with your iMac, you can re-install, then update Snow Leopard to 10.6.8, completing all updates/security updates/etc. with Software Update. Once you’re done, you should then be able to use that first link above to reach the link to High Sierra, via the App Store. From there, you should be able to download and then install High Sierra over Snow Leopard, or install to a separate partition on the iMac’s hard drive.
[A FINAL NOTE: it is possible a reason you haven’t successfully used recovery mode to get High Sierra to install might be related to an issue Apple had to address, around October 2019, when Apple re-posted several versions of the macOS installer with updated security certificates. Depending on whatever revision of the recovery partition that was on your iMac, it might be trying to grab the pre-2019 recovery installer for High Sierra.]