While iPhone does not provide a way to block Callers who hide their Caller ID, it is still possible to Block Anonymous Private Number Calls on iPhone using a workaround as provided below.
Block Private Number Calls on iPhone
The Call-blocking feature on iPhone basically works by comparing the Phone Number of an incoming Call with Phone Numbers listed in your Call Block List.
However, when someone calls your device with a Hidden Caller ID, iPhone is unable to see the Phone Number of the Caller and compare it with Phone Numbers listed in the Call Block List.
Hence, it fails to block Calls from anyone who is calling you with a Hidden Callers ID and you find your iPhone ringing or vibrating and dispaying the Call as being from someone Anonymous or a person with a Private Number.
Currently, the only way to block such Anonymous Private Number Callers on iPhone is to enable Do Not Disturb Mode on your device and configure DND Mode to allow Calls only from those who are listed in your Contacts List.
1. Block Private Number Calls on iPhone
Go to Settings > Focus > Do Not Disturb > move Do Not Disturb toggle to ON Position and tap on People tab.
On the next screen, tap on Calls From and select All Contacts option.
After this, iPhone will only allow Calls from those who are listed in your Contacts List. All other Calls, including from those who Hide their Caller ID will be blocked.
As you can imagine, the problem with this method is that it can make you miss valid or genuine calls from people who are not yet listed in your Contacts List.
However, you will still continue to get missed call notifications for all Calls made to your device and genuine Callers will be able to leave a Voicemail.