What do you use for this?
Not the person you asked, but since I'm here and they haven't replied yet...
AdGuard Home is probably the easiest.
PiHole.
Or just use uBlock Origin in your browser (or switch to Brave). There are other network-wide blockers like pfblockerng or dnsbl integrated into a recursive resolver like Unbound, but those are probably out of scope.