The technology Google is using here is very different. They also have active detection on Assitant, but this one is a passive 24/7 detection. There's a local database of the ~10k most popular songs, and it's only ~50mb [0]. It's all done locally, and when it works (Which is very often), you just have to look down at your phone and the song name is already there on the lockscreen without you touching anything.
[0] https://www.xda-developers.com/google-pixel-2-now-playing-so...