According to The Verge:
Apple bought music recognition app Shazam in 2018, and now it’s integrating it into iOS in another big way — a new Music Recognition feature can identify songs playing around you as well as in apps on your phone. And it even works when you’re listening to music on your headphones.
The new feature is available as a toggle in Control Center, but it does require a developer beta of iOS 14.2 if you want to try it right now. That toggle will look like a little Shazam icon, and you just need to tap it for your iPhone to start listening.
You could already use Siri to summon Shazam and identify songs playing around you, but being able to identify music in your apps could be handy too — if, say, you’re wondering what song that creator picked for their TikTok or YouTube video.