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
https://www.wpdesk.net/blog/vat-eu-woocommerce/
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
https://www.ptmr.io/blog/php-vies-vat-number-validation-european-vat-id/
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