To create a bootable macOS USB installer requires access to a Mac compatible with the OS installer you want to create...that compatible Mac can be running any version of macOS 10.6+. For a 2011 iMac, the two best macOS installers to create would be 10.11 or 10.13 (10.12 is broken...can be "fixed" though). You can use the information in this article to determine which Apple hardware is compatible with various versions of macOS:
https://eshop.macsales.com/guides/Mac_OS_X_Compatibility
If you don't have access to a compatible Mac, but do have access to another newer Mac, then you can try using MDS to create the bootable USB installer (I have yet to try this method myself, but saw it suggested by another respected contributor).
For a computer that old, I would worry about whether the internal hard drive has failed. You can try running the Apple Diagnostics to see if any hardware issues are detected. Unfortunately the diagnostics don't detect most drive failures. There are other ways to check the health of the hard drive (or even the computer itself) if the Apple Diagnostics don't reveal any problems and you have issues repairing or reinstalling macOS.
Here is an Apple article for how to proceed with various startup issues/screens:
If your Mac doesn't start up all the way - Apple Support
For a 2011 Mac...if it had macOS 10.12.6+ installed at some point, then you should have access to Internet Recovery Mode using Command + Option + R to access the macOS 10.13 online installer....theoretically anyway, since some Macs regardless of the keys used will only boot to the online macOS installer for the OS which originally shipped with the Mac from the factory. That could be a problem if macOS 10.13 was last installed (even 10.12).