How to properly account for VAT

How to properly account for VAT

I am a bit lost as to how to properly account for the collected VAT and than distribute the payment to the government.
I get collect payments where 19% of the deposited funds are VAT. So when I record these payments, I need to specify that 19% of that needs to be paid out to the Financial Authorities. But on the purchases I make that include 19% VAT, that amount should be collected and is deducted from the VAT payments that I owe.
So how would I create separate accounts where I can track VAT collected and VAT paid and where they offset each other and how do I than record payments to the authorities from the net balance between these 2 accounts that I end up owing as VAT payment?

Thank you