macOS installers come equipped with a script (called createinstallmedia) to create a macOS bootable USB installer drive. But sometimes it may be necessary to create a bootable ISO. The process is similar as we will use a DMG image instead of a physical drive to create the installer, which can then be converted to ISO.
Follow these steps to get the work done:
First, download the macOS installer of your choice (direct links to most installers can be found in this article). Note that you need to do this on a supported Mac with an Apple ID. The installer app will be placed in your Applications folder.
After downloading, the installer will automatically be launched: ⌘ + Q out of it.