On both my laptop and desktop Macs - under both Ventura and Sonoma - Apple Music closes immediately after I open it. But Music works fine on iOS (both iPhone and iPad).
I have tried deleting my Music library, creating a new library, clearing the cache, and deleting the Plist. It even happens on a brand new Mac l sign into - so I suspect it has something to do with syncing to my Music library in iCloud.
I don’t care if I lose all of my long-ago downloaded music - I just want to be able to use Apple Music on my MacOs devices.