Hi, and Welcome to the Apple Community.
Sorry I don't know of any way to deal with ALL.
This Apple Support article : "Avoid unwanted calls on iPhone"
Says:
Send unknown and spam callers to voicemail
Go to Settings > Phone, then tap any of the following:
- Silence Unknown Callers: You get notifications for calls from people in your contacts, recent outgoing calls, and Siri Suggestions.
- Call Blocking & Identification: Turn on Silence Junk Callers (available with certain carriers) to silence calls identified by your carrier as potential spam or fraud.
The complete article: https://support.apple.com/en-au/guide/iphone/iphe4b3f7823/15.0/ios/15.0
Apple support have another article online that may be helpful:
Block phone numbers, contacts, and emails on your iPhone, iPad, or iPod touch
(NB: You might want to scroll to; "Filter messages from unknown senders")
https://support.apple.com/en-us/HT201229
Hope this helps :-)