Hi,
That's easy to do:
- Make sure that you have configured different shipping methods for the different groups of states.
- Turn on the "shipping price per product" setting of the shipping methods.
- In each product, you'll now have a "shipping prices" section. Click on the + button for the shipping methods you want to block, check the "block" checkbox and save the product.
The checkout will then automatically remove these blocked shipping methods when the product is in the cart, and if no shipping method is left, it will display an appropriate error message.