Hey DH94114,
Congratulations on your new iMac! If we understand, about once per day the Music app will open on your Mac by itself. We can help. You mention this happening in the past. When you set up your new iMac, did you restore from a backup or set up a new user account? Do you use any audio accessories with your Mac? If so, do you notice the Music app opening when you connect the accessory?
To help isolate this, let us know what happens in a test user account. If it happens in a test user account too, reinstalling macOS may help to resolve the issue.
To create a new user follow the steps here: Set up users, guests, and groups on Mac
When you're ready to test, choose the Apple menu > Log Out, then log in with the new account. If the setup assistant asks you to sing in with an iCloud account or Appel ID, you can skip this step. Then try to reproduce the issue in the new account.
Keep us posted on the results. The more information you provide, the better chance the community will be able to offer some additional guidance.
Cheers!