Help with 2011 imac reinstall? Screwed up disk utility
Long story short I'm trying to do a factory reset on my 2011 imac. It was running High Sierra. I followed Apple's instructions, and it said to erase the HD using APFS format (it had defaulted to MS Journaled when I clicked drop down)---but now it won't reinstall the OS. It gets all the way to the end and says "Could not create pre-boot volume for APFS install". So then I saw a suggestion online to delete the drive and re-add with MS Journal formatting, so I tried that, but when I hit add, the only formats available are APFS.
So now in disk utility, I only have
INTERNAL--Container disk 2 (APFS Container) Not mounted. 196Mb with 499 GB free.
DISK IMAGES: OSX Base System Disk Image Volume- Mac OS Extended. 1.29GB used, 720MB free.
I have no idea what either of them are. But the first one is the one I deleted, but then it auto-filled with what's there now when I restarted with CMD CTRL R.
So how do I fix this at this point? Or did I brick it? I don't really care which OS I get back at this point, but I'd love to get it working again since it was fine before the reset (only did it to sell it).
Any help is very very appreciated.
iMac 21.5″, macOS 10.13