For command line apps you can cross-compile from Linux. IIRC it does require building Clang from source, and obtaining a Mac SDK (which is probably against their T&C's) but there are pre-made scripts to do it (there's a good GitHub Actions one).
That said, I only do that for free projects. For commercial stuff I'd just buy a Mac Mini.
> For command line apps you can cross-compile from Linux.
You technically can, but this has various issues. The lack of UI frameworks is one. I don't remember the others since I have a real Mac, but it's only an Intel Mac.
On a Linux host, use pts-osxcross (https://github.com/pts/pts-osxcross) to target macOS, it contains Clang and other build tools precompiled for Linux amd64.