There may be transactions that were either edited or deleted. This is why the calculation of your VAT was off. If that's the case, let's check the Audit Log report in QuickBooks Online (QBO) to verify.
Here's how:
Go to the Gear icon at the top right to get to the Audit Log.
Click the Filter button, then select the Show only these events radio button in the Events section.