The command is ever-so-slightly different for each version of MacOS that supports making a bootable USB thumb drive. You need the EXACT command for El Capitan to successfully build El Capitan. Use the apple article cited below.
What you need to create a bootable installer
• A USB flash drive or other secondary volume formatted as GUID partition Map, Mac OS Extended, with at least 14GB of available storage
• A downloaded installer for macOS Big Sur, Catalina, Mojave, High Sierra, or El Capitan.
The Terminal command assumes that Installer in located in the /Applications folder.
from:
How to create a bootable installer for macOS
Create a bootable installer for macOS - Apple Support
NB>> if you name your incoming USB stick exactly MyVolume, you can copy and paste the very long Terminal command from the article directly into the Terminal window, without having to change anything.