Do you want to write your own VAT ID plugin for woocommerce?
Here are some useful link that will help you in this task and helped me succesfully add a custom VAT ID field in woocommerce checkout page. It checks if the VAT ID is valid and remove the VAT accordingly from the price:
1- Add a VAT ID field to the checkout page
Check the DIY part! You will need to edit the hook action with a proper hook so that the field display. https://businessbloomer.com/woocommerce-visual-hook-guide-checkout-page/
2- Perform the VAT ID validation
3- Exempt customer from TAX if the EU VAT check out.https://businessbloomer.com/woocommerce-remove-tax-checkout-field-value-exists/
4- refresh the total on change