By default, a form compliance policy is already set up in each campaign's properties which only needs to be enabled if desired or needed.
Below are the steps to enable the Compliance Policy:
First, go to your Campaigns list. Then find the campaign that you want to enable the compliance policy. Open up its Properties.
Then go to See More > GDPR Compliance tab.
Then you'll see the section where you can enable the compliance details on the form as well as edit it. See screenshot below:
This is what it would look like on the form:
If you've set the compliance as required, this prompt will pop up when customers forget to tick the agreement check box: