I take it that you downloaded InstallMacOSX.dmg from this
Apple page,
How to upgrade to OS X El Capitan – Apple Support
When you open the InstallMacOSX.dmg you would have seen InstallMacOSX.pkg.
Double-clicking InstallMacOSX.pkg will open an installation window.
Following the prompts you will read that this will take 7MBs of disk space.
Now please note that no installation of an OS takes up only 7MBs of disk space,
and no installation of an operating system takes 2 seconds.
What is happening is the installation process is creating the Install OS X El Capitan.app (6.2GBs)
which you will find in your Applications folder.
If you have done this have a look in your Applications folder.
Double-clicking on the Install OS X El Capitan.app will start the real installation process.
This will probably take about thirty minutes and uses about 30GBs of disk space.
The Install OS X El Capitan.app self deletes after installation.
It is a wise idea to make a copy of it before commencing the installation.
You can simply copy it over to an external drive.
Or you can create a bootable USB stick installer using the instructions here,
How to create a bootable installer for macOS – Apple Support
or by using this free app, https://macdaddy.io/install-disk-creator/