I use uMatrix for this. You can set it up to blacklist (or whitelist) various types of capabilities (cookies, images, scripts, etc.) by default, and then you can toggle individual ones on or off for particular domains. It's more complex than "casual" users would want to deal with, but it's pretty straighforward for technical people.
For example, here's how it looks on Cake, you can see that I have the scripts from the *.cake.co domains allowed (green squares), but I'm blocking the googletagmanager one (red square). imgix is allowed to display images, but if it tried to use scripts or cookies they'd be blocked, and so on.