Apple doesn't provide a good documentation and tools about manually creating Apple Bundles, Signing, Notarization and Stapling. When you cannot use XCode or don't want use XCode you're in the Apple Hell.
I've ported an already running and shipped desktop application from Linux and Windows to Mac. First and foremost you save some time with the network stuff because there is still some POSIX in MacOS and you got a usable shell also.
We cannot use reliable XCode, because it doesn't support Meson or anything else outside of Apples own world reliable. Compiling code with 'homebrew' works, yes.
Creating the App Bundle itself is the first big burden, because outside of XCode you have to create them fully manually and using 'otool' to adjust every library path which is used internally. Even the icons hurt you, you cannot provide one big PNG or SVG (Linux) or melt it into the executable (Windows), but a icon for every size someone can imagine. ImageMagick is your friend. What year is it? 1995?
Because we cannot use XCode and have to build stuff repeatable, we also stick with 'codesign'. Which is horrible to use, because it's recursive option is not reliable and you have to sign nearly every bit in an App Bundle. On Windows you sign the executable or the howl installer, here you sign nearly everything.
But watch out. The certificates included by default in your Apple Account are likely all false friends. There badly name and desribed and you cannot see that you don't get the needed type of certificate as non account owner. So be careful with company accounts! Always ensure that multiple people have permanent access to this as owners and can immediately accept the new terms - or you cannot ship anything anymore. Happened this spring/summer to me :(
Signing done? Fine. Now hope that your 3rd party code doesn't show nasty bugs after signing, like the code from our partner. Furthermore don't expect that MacOS tell you via console what is going wrong and what you need. But itt could maybe help a little.
Then uploading for "notarization" follows. I hope you didn't make something bad and placed the right file in the wrong directory of the bundle or it is declined.
Finally attach (staple) the notarization to your bundle! Or every Mac there will ask the Apple Servers if it is "okay to execute this code now". Without it privacy is lost. And the startup is slowed down also.
If your going to support MacOS, don't assume that portable code is portable. The shipping is actually the hard part.