To block a number, from the home screen, tap Phone. Note: You cannot block an Unknown Caller (No Caller ID), but you can turn on 'Do Not Disturb' manually and set it to 'Only allow calls from your contacts list'. The call blocking feature may not affect phone calls made or received via third party apps installed on your device. Please contact third party app developers for assistance with such applications.
Tap Recents.
Tap the Info icon 'i' next to the contact or phone number you want to block.
Scroll to the bottom of the Info screen and then tap Block this Caller.
Tap Block Contact
To unblock, tap Unblock this Caller.
You can see the contacts and phone numbers that you've blocked in Settings under Phone > Blocked, FaceTime > Blocked, or Messages > Blocked. You can also Add New blocked numbers and Edit (Unblock) numbers from within Settings. Note: Learn more from Apple support article: Block calls and block or filter messages on your iPhone and Use Do Not Disturb on your iPhone