No, your new iMac is not supported by El Capitan. I think Mojave is the earliest version the iMac can run. You can make a bootable USB flash drive, however, on the new iMac. Use this link: Download OS X El Capitan. A file named InstallMacOSX.dmg will download to your Mac.
First, review this introductory article: Create a bootable installer for macOS. Second, read this How To outline for creating a bootable macOS installer. Simply use the Terminal command by copying and pasting the command line for the version of macOS from the list below. You will need an 8GB or larger USB flash drive that has been partitioned and formatted for use with OS X as well as an installer for the desired macOS version that you have previously downloaded from the App Store.
Drive Partition and Format
- Open Disk Utility in the Utilities' folder.
- After Disk Utility loads select the drive (out-dented entry with the mfg.'s ID and size) from the side list.
- Click on the Erase tab in the Disk Utility toolbar. Name the drive, "MyVolume". <---- IMPORTANT!
- In the drop down panel set the partition scheme to GUID. Set the Format type to Mac OS Extended (Journaled.)
- Click on the Apply button and wait for the Done button to activate. When it does click on it.
- Quit Disk Utility.
Create Installer
Open the Terminal in the Utilities' folder. Choose the appropriate command line (begins with "sudo") depending upon what OS X installer you want. I've bolded the command for El Capitan. Paste that entire command line from below at the Terminal's prompt:
Command for macOS Catalina:
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
Command for macOS Mojave:
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
Command for macOS High Sierra:
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
Command for macOS Sierra:
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ macOS\ Sierra.app
Command for El Capitan:
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app
Command for Yosemite:
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ Yosemite.app
Command for Mavericks:
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ Mavericks.app
Press RETURN. You will be asked for your admin password. It will not echo to the Terminal window. Then press RETURN again. Wait for the return of the Terminal prompt signifying the process has completed. It takes quite some time to finish. Be patient.
The bootable installer can be used to install the selected version of macOS. Shut the computer down. Insert your flash drive into a USB port. Start the computer like so:
Boot Using OPTION key
- Restart the computer.
- Immediately after the chime press and hold down the "OPTION" key.
- Release the key when the Boot Manager screen appears.
- Select the disk icon for the USB flash drive.
- Click on the arrow button under the disk icon.
I don't know what you downloaded as the El Capitan installer but I have provided the link earlier in this post. The download is a disk image file with a ".dmg" extent or filetype. It will download to your Downloads folder, so make a copy in the Applications folder.