How can I prevent Music app from starting automatically randomly?
I have had this experience and I discovered that my finger was lightly brushing the "Play" button on the MacBook Pro's Touchbar. If the current app has no hook for that button, it seems that macOS now choses to launch the Music app. 

The solution should be to run launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist. See this howtogeek for details.