As you already know, trying to create an automation so that Spotify automatically plays a precise song on iOS is a real pain, not to say mission impossible. Most of times, we can have the Spotify application open, but the song won't play automatically...
I managed to create an automation with the Shortcuts app, so that Spotify plays a precise song on my iPhone 12 or my SONOS when I use an NFC tag.
I used almost the same automation with my car (without an NFC tag) and when my iPhone connects to its bluetooth, automatically the specified song plays on my cars bluetooth.
Instead of using the "open URLs" command, I extract the URL from a text.
Check my video, where I include photos of the process (and sorry for my English).