Can't downgrade MacBook with external ssd

I struggle because im using a beta version of macOS, making me unable to export my Xcode build to App Store Connect. so I wanted to downgrade my silicon MacBook to Sonoma, in order to install the latest not beta version of Xcode. but I really struggle: I want to use an empty external ssd disk but when following the doc I face the following issue: if I perfectly follow this https://support.apple.com/en-us/101578 when I try to boot in recovery by selecting the Sonoma installer, my external disk is gray showing the error "This volume is not formatted as APFS". sorry for low quality

then if I try to fix this, by going to Disk Utility, finding my external disk and format it to APFS (instead of Mac OS Extended (Journaled) like in the doc), when I try to run the command of the doc I get:

leandrotolaini@Leandros-MacBook-Pro ~ % sudo /Applications/Install\ macOS\ Sonoma.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled
Password:
Ready to start.
To continue we need to erase the volume at /Volumes/Untitled.
If you wish to continue type (Y) then press return: y
APFS disks may not be used as bootable install media.
An error occurred erasing the disk. 

this occurs when I change format to APFS here

I don't know what to do...

I'm not sure why it isn't working for you, but I'll tell you how I manage booting various OS versions from an external disk.

Shut down the computer, boot into Recovery. by holding down the power button until Options appears.

Enable booting from external volumes, in Startup Security.

Reboot.

Connect your external disk, in Disk Utility, select the entire disk (ESD310S...) and partition it.

Select APFS as the partition type.

After that is done, you'll have one volume called Untitled.

Rename the Untitled volume to "OS Installers".

Select the Container disk above the Untitled volume and choose to add a volume to it.

Make the new volume APFS, call it "Sonoma".

Then,

softwareupdate --list-full-installers, to get the correct name for the installer. softwareupdate --fetch-full-installer --full-installer-version 14.6.1, for example. This will download an installer called "Install macOS Sonoma" to your /Applications folder.

Drag the installer from /Applications to the "OS Installers" volume (I like to keep them around).

Double-click Install macOS Sonoma, wait a while until it is verified.

Once it is ready, you should be able to go through the steps to install Sonoma onto your external disk (volume), called Sonoma, and boot from it.

Can't downgrade MacBook with external ssd
 
 
Q