An iPhone does not let a web page hear what other apps play, and turning the mic on usually pauses them. Three ways around it:
Share the link
In Spotify, Apple Music, YouTube or Shazam tap Share, then Copy link. Come back here and tap Paste.
Spotify, one tap
Connect Spotify once, then Playing on Spotify opens whatever is playing.
Shazam from Control Center
iPhone's Music Recognition (Control Center, or the Action button) can name songs playing in other apps, even with headphones in. Tap its result, then Share, Copy link, and paste it here.