It surprises me that your Late 2015 Mac let you try to install Mavericks in the first place. I would have thought that when you ran the installer application, it would have displayed an error, and left your current system unchanged.
Going point by point:
- Macs don't run iOS. That's Apple's mobile operating system for devices like iPhones.
- I'm not sure where you'd get a legitimate copy of Mavericks, unless you already had one on a Mac or a backup. If you look at How to download and install macOS - Apple Support , you will find links for every version of the Mac's OS from Mac OS X 10.7 (Lion) to macOS 15 (Sequoia), EXCEPT Mavericks, which is inexplicably missing.
- Apple originally shipped Late 2015 iMacs with OS X 10.11 (El Capitan) or OS X 10.11.1 (El Capitan). Macs can't run versions of the OS earlier than the one that first shipped with them. So you couldn't install Mavericks as the host operating system on that Late 2015 iMac in any event.
- A Late 2015 iMac can run anything up to macOS 12 Monterey.
If you need to run old 32-bit applications, I would suggest installing High Sierra (10.13) or Mojave (10.14). If you do not, I would suggest installing Monterey (12). You may need to use Recovery mode to erase the disk, and possibly also to install El Capitan before then using it to upgrade to the destination OS of choice.
Use macOS Recovery on an Intel-based Mac - Apple Support