O Handoff quite a resource. You can, for example, start writing a document on Mac Pages and continue where you left off on iPhone.
Don't ask me why, but if you are an Apple Music subscriber and start listening to something on your Mac, you just can't listen to it on your iPhone. Of course you can simply start playback again on your smartphone, but the experience is not exactly the same.
If Apple doesn't, others do. And the app Playoff came to fill that gap.
When installing an app on your Mac and iPhone, it uses Bluetooth and the MusicKit API to share playback between the two devices. Then, when you start listening to something on your Mac, you can switch to iPhone and vice versa without any difficulty.
Because it is not something native, implemented by Apple, there are some limitations. Devices must, for example, be physically close because of Bluetooth connectivity.
Going forward, the developer responsible for the app will add iPad support, auto-out audio switching (great for those with AirPods and wireless headsets) and broader support (so you can keep playing not just one song, but an playlist entire).
The iOS app version costs $ 7.90, while the free macOS app.