@Piotr Kiapśnia Greetings!
VAT ID should be added in the Portal UX not programmatically. We do not have any public API to update the VAT ID programmatically. Please refer to the MS article - https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/manage-tax-information#add-your-tax-ids for guidance on adding VAT ID/TAX ID in the Azure portal.
Do let us know if you are getting any error in adding the VAT ID in the Azure Portal.
Hope this helps.
If the response helped, do "Accept Answer" and up-vote it