When you open the InstallOSX.dmg you will get the InstallOSX.pkg.
Opening that you will see an installation window.
The installation window does not install Mac OS X El Capitan.
(the text in the box says it will take about 14MBs of disk space
and the process takes two minutes, no OS only takes up 14MBs
and only two minutes to complete).
When this installation window asks you where you want to 'install' to you must pick
the disk you are currently booted to, not the new disk you want El Capitan on.
Select the disk you are booted to and press Continue, what this process actually
does is create the Install OS X El Capitan.app in your Application folder, it will be
6.2GBs in size. Double click on that to install El Capitan, the installer prompts will
ask you where you want to install El Capitan, this is where you select your newly
formatted drive.
The installation should take about 15 to 30 minutes to complete and will use about 25-35GBs of disk space.
After the installation the installer app self deletes, before installing you can make a copy of it for safe keeping,
or create a bootable USB flash drive installer using these instructions.
How to create a bootable installer for macOS – Apple Support (UK)