Search covers message text across every channel you can see. It never returns a result from a private channel you are not in, or from another organization — the visibility check runs inside the query rather than filtering the results afterwards.
Filters narrow it fastest. Type them in the search box beside your words: from: a person, in: a channel, has: a file, a link, a reaction, a pin, a thread, a poll, an image, a video, a sound, a voice message, a sticker or a forward, is:saved, is:thread or is:pinned, before:, after:, on: or during: a date, pinned:true for pinned messages, and authorType:user for only what people wrote (Exclude automations). Search suggests the people, channels and dates as you type a filter.
Search matches the words of a message and the names of files, not what a message means, and a search cannot be saved to run again. Worth knowing before you conclude something was deleted.