If you listen to music while navigating (driving, commuting etc) you can control your music right on Google Maps.
Here is how to do it on iOS (I assume Android is similar):
1. Go to your profile.
2. Go to Settings.
3. Go to Navigation under the Getting Around section.
4. Go to Music playback controls.
5. Choose Spotify or Apple Music and set it up.
Once it is set, you are able to see this "Continue playing" button on the home page of Google Maps if you swipe up the bottom section:
If you click on this button, it syncs with Spotify to open whatever you played last on Spotify (sometimes it ends up playing but the buttons do not appear - you need to close and open Spotify to make it work properly)
And now you can see what song you are playing, pause it, move to the next or previous song without leaving Google Maps: