Don’t open anything
noTunes is a macOS application that will prevent iTunes or Apple Music from launching.
Simply launch the noTunes app and iTunes/Music will no longer be able to launch. For example, when bluetooth headphones reconnect.
tombonez/noTunes: A simple macOS application that will prevent iTunes or Apple Music from launching.
Open something else
Set replacement for iTunes / Apple Music
Replace YOUR_MUSIC_APP
with the name of your music app in the following command.
Then /Applications/YOUR_MUSIC_APP.app
will launch when iTunes/Music attempts to launch.
This can be used to open a website too, for example, YouTube Music.
The following command will disable the replacement.