You can use Mastodon's filters feature to hide posts containing particular words, phrases, hashtags, links or emoji. There's a guide to using it at:
➡️ https://fedi.tips/filtering-your-timeline-to-hide-posts-on-mastodon
If you specifically want to block hashtags:
- Make sure the filter for the tag has the "whole word" option UN-ticked (not ticked). If this is ticked it may not work against tags.
- Don't include the #, just write the tag's word on its own.
- If the tag is a phrase, write it all in one word without spaces.