A compliance policy is actually already available in each campaign's properties by default which only needs to be enabled if you want to.
First, go to your Campaigns list. Then find the campaign that you want to enable the compliance policy for. 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 how 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: