Depending software you use, you have a lot of free scripts (google help a lot with a few search), for wordpress :
- GDPR Cookie Compliance (CCPA, PIPEDA ready)
- XcooBee GDPR Cookie Manager
For custom web you have other solutions:
- thodorisit/GDPR-Cookies-Manager
About plesk script, I am...