Several years ago Apple bought a company called Shazam which made an app that identified songs by listening to the music playing nearby. Since then Apple has built Shazam into Siri in iOS, iPadOS, macOS, and watchOS.
Most recently Apple added it to Control Center in iOS 14 and iPadOS 14 as well so you can invoke it without speaking. To use Shazam whenever you want to identify a song that’s playing nearby just ask Siri, “What’s playing?” or tell it “Name that tune” or have some fun and say “Shazam!”
To add Shazam to Control Center, navigate to Settings > Control Center, and tap the green + button next to Music Recognition. Then, from Control Center tap the button to start it listening—you can return to whatever you were doing. When the song is identified a notification appears with its name. Tap the notification to open the song in the Music app.