How to make bootable El Capitan installer in Mojave?
This would be painful. 


Download High Sierra. See How can I download an older version of OS X/macOS?
Copy High Sierra to a flash drive. See How to create a bootable installer for macOS
Install High Sierra to a new volume in your APFS container. Here I assume you have enough free space.
Goto the App Store while logged into High Sierra. Download El Capitan. Here I assume you have previously downloaded El Capitan.
Copy El Capitan to a flash drive. See How to create a bootable installer for macOS
Remove the High Sierra volume from your APFS container. See Remove macOS from a APFS container?


Another alternative would be to install High Sierra in a virtual machine. This would avoid the need to remove the High Sierra files from your APFS container volumes. Installing in the virtual machine application does require modifying your current macOS (Mojave). While removing the High Sierra virtual machine would be fairly easy, removing the virtual machine application would probably not be a good idea. So, once you install a virtual machine application, you will probably not want to uninstall. 

Personally, I have only run Snow Leopard and Yosemite in VirtualBox virtual machines. Other virtual machine applications are VMware Fusion and Parallels. User @user3439894 has posted in a comment a preference for VMware Fusion which was used to run High Sierra.

If you choose to use a virtual machine and are having problems setting up, you may want to post a new question.