GDPR is not the EU regulation on cookies. GDPR only has a single direct mention of cookies. The ePrivacy Directive is what's known as the "cookie law" (https://gdpr.eu/cookies/)
The ePD dates to 2002 but stupid cookie banners only came into being around the same time as the GDPR in 2018. I think you can say the cookie banners are in some technical legal sense ePD's fault, but to laypeople it certainly seems that the GDPR is why every website is less usable and more annoying than it was just a few years ago.
I don't think that's right, I remember joking about cookie banners in the late 00s. Since GDPR they now have buttons and categories though, whereas previously we never had a choice, just a notice that cookies were in use.