Thanks for reaching out to the Apple Support Communities. I understand you've had some trouble With Apple Music closing unexpectedly, and I have some information that may help.
Have a look at the article below for some helpful troubleshooting steps. It focuses on general apps but may help with Apple Music.
If an app unexpectedly quits, stops responding, or won’t open - Apple Support
When you get to the step about deleting the app, keep in mind that removing the Apple Music app may also delete any music that you've downloaded for offline listening. You'll need to re-download the music after reinstalling the Music app.