Even if Google doesn't mark a call as spam, you can report it as such from the "recent calls" screen and block it. Nexus devices already have caller ID that shows companies using Google My Business listings, and references directories to show caller info from work or school accounts. For those features to work, Google notes that "your phone may need to send information about your calls to Google," presumably it can add the info to a database.

Google is actually late to this game, as Samsung's Galaxy S7 has offered caller ID and spam protection since February thanks to an alliance with Whitepages. However, spammers are nothing if not determined, and can still get through using tricks like call spoofing. Until telcos start blocking them at the source as the FCC has requested, you're still going to get spammed, even with Google and Samsung's help. The update should roll out to your Nexus or AndroidOne device soon, or you can sideload the APK here, provided you have Android 6.0 or greater.