If you already have a genuine macOS installer .app , you can convert it to ISO for virtualization:
Once you have the installer (e.g., "Install macOS Sonoma.app") in your Applications mac os x iso download 64 bit top
or Apple's official support channels and convert them yourself. Official Methods to Obtain macOS Installers If you already have a genuine macOS installer