Hello owain112,
Thank you for posting in Apple Support communities. We understand that you are unable to play music on your iPhone XR. We would love to provide you support on this.
If Apple Music isn't working on your iPhone there is a couple of items that you can check.
-First make sure you are on the latest iOS version 14.7.
-Next make sure you're signed into the iPhone with the same Apple ID that you are using on your iPad since Apple Music is working there. We would also recommend making sure there isn't any screen time settings that is blocking access to Apple Music.
-Lastly you should make sure that the data usage settings for Apple Music is set accordingly to how you are using your device, for example if you have it set to only play over wifi be sure that you are connected to wifi when trying to play a song.
Listen to music and more in the Apple Music app
View or change cellular data settings on iPhone
Thank you for allowing us to support you.
Have an awesome and productive day!