The DuckDuckGo browser has this baked in as 'Cookie Pop-up Protection'. It doesn't quite get rid of them all, and doesn't let you set a default for what you want (it'll basically pick the most privacy-forward option) but I've found it works pretty well.
It should be just a browser option.
You set cookies on or off, ans the browser sends the option in the headers. Websites just need to take the option from the header instead of a banner.
The DuckDuckGo browser has this baked in as 'Cookie Pop-up Protection'. It doesn't quite get rid of them all, and doesn't let you set a default for what you want (it'll basically pick the most privacy-forward option) but I've found it works pretty well.