iPhone
To prevent spam calls on an iPhone, you can silence unknown numbers. This means that withheld numbers and numbers which aren't in your contacts (apart from numbers that you've tried to call recently) will all go straight to voicemail. These blocked calls will still be shown on your recent calls list. To silence unknown numbers on an iPhone:
Go to your Settings app
Tap on Phone
Go to Silence Unknown Callers
Toggle Silence Unknown Callers to be on
Android devices
There are two ways to stop spam calls on Android devices.
To filter out spam calls:
Open the Phone app
Tap on the three dots in the top right hand corner
Tap on Settings
Go to Spam and Call Screen
Turn on Caller ID and spam protection
Optional: Tap Block numbers and turn on Block spam and scam calls (Note: You won't get missed call or voicemail notifications from these calls which have been filtered, but you'll still be able to see them in your call history and voicemail.)
To stop calls from withheld and unknown numbers:
Open your Phone app
Tap on the three dots in the top right hand corner
Tap Settings
Tap Blocked numbers
Turn on Unknown
Reporting spam calls
You can report spam numbers here