What age are the two iMacs, at one point in time could they have or do they run El Capitan. If they do you can download El Capitan from here, How to upgrade to OS X El Capitan – Apple Support, this is the updated release with the new certificates released in October 2019.
At Section 4 of the How To... click on Download OS X El Capitan, this will download Install MacOSX.dmg to your Downloads folder.
Double-click on that and it will open to the InstallMacOSX.pkg, double-clicking on that will bring up an installation window, this does not install El Capitan but converts the .pkg to the Install OS X El Capitan.app which you will find in your Applications folder.
You can then make a bootable USB installer using the createinstallmedia command in Terminal, see the instructions here,
How to create a bootable installer for macOS – Apple Support
Having made your bootable USB stick you can then plug it in your MacBooks to install El Capitan.
Once the USB is plugged in, restart your mac whilst holding and pressing the option/ alt key, after a couple of minutes
the Startup Manager will show, this is a graphic representation of the bootable disk on your mac, select the USB and press Return.
When you boot up to the USB you will be able to install OS X El Capitan.