Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the protection of natural persons with regard to the processing of personal data and on the free movement of such data, and repealing Directive 95/46/EC (General Data Protection Regulation) (OJ L 119, 4.5.
The basic requirements for the effectiveness of a valid legal consent are defined in Article 7 and specified further in recital 32 of the GDPR.
Consent must be freely given, specific, informed and unambiguous.
In order to obtain freely given consent, it must be given on a voluntary basis.
EDPB guidelines 05/2020 clarify that valid consent is a freely given, informed, specific and unambiguous indication of a user's wishes.
This means that your website must give users a real choice of consent between all different cookies and trackers, prior to their activation and personal data processing.