I use ublock origin for this. Just use the dropper to pick the element.
You can also block elements by text content [1], for those that did not know. I ran into a site that tried to counter uBlock by randomized class names, among other things, but was able to target it properly that way.