How did you implement the cookie consent on your webpage?

I am looking for a cookie consent “plugin” or .JS askript and how to implemnt this on the public webpage.
How did you do it?