There are so many ways to do it. It really depends on how you want the message to appear.
It is really just showing a message when a cookie isn't set ("acceptedCookies") and saving the cookie when the terms are accepted.
If you are looking for a packaged solution you can use google to find one by searching for: "cookie consent popup"
Here is one I found: https://cookieconsent.insites.com/