One technique I use is my phones have an area code from another state that I never get calls from. (South Dakota). If I get a call from this area code I know it’s spam.
One potential flaw of this approach is that there are potentially legitimate services that bridge internet calls to local numbers. IIRC, Skype worked this way, and I assume other things like Google Hangouts and Twilio do, too.