We can't block an entire area code on the iPhone due to restrictions from Apple, but we can warn or block an area code and prefix.
If you receive a lot of spam calls from a specific area code and prefix, you have the ability to warn or block that in the Hiya app. There is a way to warn or block spoofed calls in the iPhone app. In the Hiya app, tap on the Protect tab, then scroll down to the Neighbor Scam option tap on it, turn it on, and enter a number.
You can set a warning for up to 25 of these number combinations on the free version of the app. Auto blocking these is only available on the Premium version.
If you have a subscription to Premium you can block up to 25 of these number combinations.
You can Whitelist your contact list on the iPhone. Go to the Protect tab and scroll all the way down to see the option to whitelist. You will need to make sure the number in question is in your contact list for it to go through. Make sure you don't close the app after this. A call list update will have to go through for the change to take effect.
You can remove an area code and prefix by sliding the number to the left and then tapping Delete.