It is important to hold back cookies before the user has consented to cookies. This is done by holding back the scripts that set the cookies.
Please follow these extensive guides: https://support.cookieinformation.com/en/articles/4418485-implementing-cookie-control-sdk