To perhaps help further if you buy a brand new motorhome abroad you pay the VAT in the country of origin but on import to the UK there may be additional VAT to pay. For example the rate of VAT in Germany is 19% but the rate in the UK is 20% so you will have a bit more to pay. The mechanics of how it is done I will leave to those with actual experience eg @Lenny HB
With vehicles you pay the VAT in the country of registration.
We buy from our dealer VAT free and then pay the UK VAT. Some dealers you have to pay them the VAT then they refund you once you show them proof the UK VAT has been paid.
You can't register a vehicle until the VAT has been paid. All done online now, takes about a week now because HMRC only do finances on Tues & Thur. Used to take 2 days.