To restrict shipping destinations in WooCommerce specify countries you ship to. Do not set a shipping option for countries you don’t ship to.
But beware how WooCommerce behaves at checkout when you mix products that have different shipping restrictions.
Let’s suppose you sell some products to a lot of countries and some products only with your home country.
You add them to your catalogue and you set up shipping costs for for your home country. And because you are not going to ship outside your home country, you do not set up shipping costs for that item for any other countries.
You add that item to the basket and you say you are a customer in another country. The checkout will flag that it does not have a shipping option for that country. That’s expected behaviour and it’s what we would want.
But now you also add a product that you do ship to many countries to the basket. WooCommerce will override the rule about shipping destinations and charge shipping based on the products that you do ship. That is definitely not what you want.
The solution, is to use the WooCommerce Advanced Shipping Packages extension. It’s not expensive at $49 per year plus tax.