Hello CherylF86,
Thanks for reaching out to the Apple Support Communities. From your message I understand that you're having an issue where the sign in prompt is reoccurring in the Music app. I know how important it is to be able to access your music, and I'm happy to help.
If this were occurring on my own Mac, I'd work through these steps:
1 - Quit the Music app. If it will not quit, follow these steps to force it to quit: How to force an app to quit on your Mac.
2 - Restart your iMac: Go to the Apple menu in the top left corner of your screen > Restart.
3 - Hold down the shift key on the left side of the keyboard as you click to launch the app. This will tell Music to bypass the last saved state the app was in. Once Music begins to bounce in the Dock, you can release the shift key and it will launch.
4 - Try logging in by going to Account in the menu bar.
5 - If the issue persists, restart your Mac in safe mode and test again: Use safe mode to isolate issues with your Mac.
6 - If still occurring in safe mode you’ll need to create a new user and test it out again. This article will show you how: How to test an issue in another user account on your Mac.
I hope this is helpful.
All the best!