Step 1. To list some specific postcodes, please go to Magento Admin Panel → Sales → Shipping Areas, click the Add Shipping Area button, fill in the name of the Area, select the country, and the Include/Exclude action for your postcodes. To configure a postcode range, please fill in the first and the last postcode of it:
Step 2. If you would like a single postcode to be validated, please add it to the first field leaving the second one blank:
or switch to the text area input and add all of the postcodes separated by a comma for single values or a hyphen for ranges:
Step 3. After the Shipping Area is saved, it can be used in the Shipping Restriction Conditions section:
Here is how the Shipping Restriction is going to look on the frontend when one of the Shipping Area postcodes is entered:
If a postcode doesn't belong to the Shipping Area, the previously blocked shipping option will be available:
Option #2
You can also try blocking some delivery methods by using the Shipping Postcode condition of the Shipping Restriction like so: