The Pixel 2 and 2 XL have a nifty always listening music ID feature. You can simply look at your phone and see a “Now Playing” notification that tells you if the phone has heard a popular song. Google doesn’t keep a log of the songs you encounter, but you can do that yourself with IFTTT.
IFTTT user hypnopompia created an applet you can add to your IFTTT account right now. It uses the Android notification service to watch for the Now Listening notification, then it logs the content of that notification to a spreadsheet in Google Drive.
Use this IFTTT applet to log your Pixel 2 Now Playing history to a Google Spreadsheet was written by the awesome team at Android Police.