Here's how to install macOS to a brand new internal drive.
Apple discussions lets you ask a question, but there's no option to write up a solution. Isn't that how it often is with Apple? You want to do something just slightly less common, and it seems at first no one's done it before. But there's always a way to do it. That's what we have here.
Suppose you install a brand new SSD or HD in your Mac. You avoided all the obstacles and land mines with temperature sensors, and now you want to install macOS. On a blank internal drive.
You've made a USB installer, and you've booted off the installer. What do you tell Disk Utility? You need to initialize the drive first, but what are the parameters?
In my case, I was installing Catalina on a 2013 model iMac, and I imagine these instructions will apply for the succeeding one or two OS versions.
When you have a blank drive, Disk Utility will come up and show the drives you have.** Likely you'll see your new internal drive, and your USB installer drive -- along with all its volumes.
Select your internal drive and click Erase. Now Disk Utility will give you a choice of file systems. Leave it set to MacOS Extended (Journaled), with GUID partitioning scheme.
But you want APFS, because it's better. Well just wait. Now that you're done initializing the disk, you can install Catalina, and the install process will create the EFI partition and change the remaining area of the disk to APFS. Not MacOS Extended.
And you're done.
Since this is the internet, I can imagine someone will say "this is the same as any clean install" and that is unfortunately not the case. The situation for a clean install in Disk Utility is completely different. If you go to clean install Monterey for example (I'm choosing examples that I've done myself) on a drive that *already* has MacOS on it, Apple Support clearly says you want to erase the Volume Group, not the drive. Disk Utility makes doing this easy even though mere mortals like me have no idea why the distinction needs to be made.
**If you need to D.U. has a button you can use to switch between viewing drives, and viewing volumes.
iMac 21.5″ 4K, macOS 12.6