I don't think XenForo has this kind of functionality, to do it automatically.
But you can create a custom ad blocker rule to block elements with certain keywords.
I use Ublock Origin, for example, and you can use the element picker to click on an example of a forum post, and then use ":has-text(words)" to define the keywords. Ublock will block posts with those words.
But you can create a custom ad blocker rule to block elements with certain keywords.