Lemmy itself allows you to block communities, instances, and users. But it does not support filtering by keyword, e.g. filtering out any post with the word "platypus" in the title regardless of where it was posted or by whom. With help from the comments below, here are some third party Lemmy clients that have their own implementation of keyword filtering:
I use Thunder on iOS and it says it’s available for Android too. It has filters and I have them set to exclude just about any word I can think of that has to do with US politics. I haven’t seen a post about that yet so I assume it’s working.