EU law is not at fault here. At fault are the websites that feel the need to be so obnoxious in their behavior, that they are told to have those consent prompts for all the obnoxious shit they engage in. Basically, the EU is doing the Lord's work here, making these sites annoying, so that people might be persuaded to leave those websites. Unfortunately, the EU does not persecute harshly enough, so that all kinds of grifters do not follow the law and get away with it.
I am tired of people making excuses for the EU. The EU has had almost a decade to respond to the numerous complaints about those cookie banners and their answer has been "talk to the hand" -- and they wonder why they are being overrun by right wing populists.
It is the worst of German "incumbents über alles" and American legalism. "Respect DNT or go to jail" would have been fair and easier to administer but Big Tech lobbyists helped design the GDPR to stifle smaller competitors who couldn't laugh at the occasional fine for malicious compliance.