I assume it's better these days, but Mastodon avoided adding proper search for years because the core devs knew there was plenty of questionable content or there and making it discoverable would put many hosts at legal risk.
I'll see if I can find the links, it's been a while since I last saw them, but there was a very active GitHub issue on the main Mastodon repo back in 2017 or 2018 related to search. It came down to concerns over content that is considered acceptable in some cultures and child pornography in others.