The ePrivacy directive, mostly referred to as "Cookie law" is from 2002.
https://eur-lex.europa.eu/legal-content/EN/ALL/?uri=celex%3A...
https://eur-lex.europa.eu/legal-content/EN/ALL/?uri=celex%3A...
And the GDPR's subsequent entry into force created the current emphasis on how actively (and individually) you need to consent to things, and how much you have to be told about them first. Stuff like "clicking anywhere on this site, tells us you consent" was a lot more common, pre-GDPR