Supposedly, the following command to create the DMG is supposed to be the same thing as doing it from the GUI, but I get errors about erasing the DMG later in the process when I do. So create it via the GUI if you get an error.sudo hdiutil create -o ~/Desktop/Ventura -size 16000m -volname Ventura -layout SPUD -fs 'Case-sensitive Journaled HFS+'
Mount the DMG file. Assumes the DMG is on the Desktop and named Venturahdiutil attach ~/Desktop/Ventura.dmg -noverify -mountpoint /Volumes/Ventura
Copy the files from the install DMG you downloaded from the app store to the DMG volume.sudo /Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/Ventura --nointeraction
Unmount the DMGhdiutil detach /Volumes/Install\ macOS\ Ventura
Convert the DMG to CDRhdiutil convert ~/Desktop/Ventura.dmg -format UDTO -o ~/Desktop/Ventura.cdr
Rename the file to ISOmv -v ~/Desktop/Ventura.cdr ~/Desktop/Ventura.iso