Hello LouisPrashanth,
We understand you're subscribed to Apple Music and are able to play music from your android device but unable to connect on your MacBook Pro. We'd be happy to help!
Let's be sure to follow the guidance provided in Turn on Sync Library with Apple Music. Once Sync Library is enabled on your Mac, test if you're able to play music. If you're still unable to play music, quit the music app, hold the Shift key and open the Music app again. This doesn't change the settings, but the app forgets any windows that were open the last time you quit the app.
We hope this helps!
Thanks for using Apple Support Communities. Have a good one!