What brand/model phone? Who is your cell provider?
Some in either category are better at providing spam blocking tech than others. It may be an option you either have to set on the phone, tell your cell provider you want turned on, or both.
With the rise in the ease of "spoofing" phone numbers, it no longer works to accept from certain area codes or prefixes. Many times, I get spam calls that are from my own phone number(!).
Refusing to answer any call, except from those in your contact list, does seen to, over time, greatly reduce the number received. Can be an irritation if a call comes in from, say, your doctor on an unknown number - and then you have to play phone tag trying to get back in contact with them.