Followup ... for a moment I thought you would be able accomplish this via Terminal using the softwareupdate command. But then I remembered that even doing it that way the installer will be saved to your Applications folder. I don't know any way to redirect it to a different save location.
If you have another Mac available:
- You could use either the App Store or Terminal to download the installer, then build a bootable installer flash drive to use with your mini to install macos on its external drive.
- Or install macos directly onto the external drive, then swap it to the mini
Still, it would be best to clear enough space on your mini's internal drive.
Are you running Sonoma on the internal drive now?
Why do you want to use an external as a boot drive? Your question sort of implied that you want to boot from the external instead of the internal drive & use your internal drive for data. That's backwards from normal, especially if your mini is Apple Silicon.