How Does Magento 2 GDPR Cookie Consent Work?
#Magento 2 GDPR Cookie Consent feature displays a clear cookie banner when users visit the store. #customers can accept, decline, or customise cookies by #category, including essential, performance, and functionality. Their selected preferences are saved for future visits, so the notice does not appear again. A default #cookie content block is created automatically, helping merchants manage cookie #consent and maintain transparency across all storefront pages.
https://store.webkul.com/magento2-gdpr-module.html