Wiped an old iMac for my nephew and it tops out at OS X 10.11 El Capitan. The App Store won't show it to me. Is there still an official download from Apple, and how do I make a bootable installer?
Apple still offers El Capitan on their how to download macOS support page - search for that, it comes as a dmg with an installer package inside. Run the package on a mac and it puts the installer in Applications.
The annoying bit: the installer's certificate has expired, so it can refuse with a damaged or can't be verified error. Setting the clock back to around 2016 before you run it gets round that, from Terminal in recovery with the date command if you have to.
If the iMac shipped with El Capitan, internet recovery with shift+option+cmd+R at startup may give you it directly, no usb needed.