Spotlight problems
The app is in /Applications. Spotlight refuses to admit it. Four causes, in order.
System Settings → Siri & Spotlight → make sure Applications is ticked in the results list. Unchecking it removes every app from Spotlight, and nothing else about search changes — which makes it a confusing symptom.
macOS keeps a database mapping apps to what they can open. When it goes wrong, apps become unfindable and file associations misbehave. Rebuild it:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
That is one long line. It rebuilds the database and takes a minute or two.
Apps in ~/Downloads, on an external drive, or inside a folder within /Applications are indexed less reliably. Move it to /Applications proper.
sudo mdutil -E /
Some apps are indexed under a name you would not type. Visual Studio Code is Code, 1Password may register differently, and Setapp apps live in a nonstandard folder.
A search tool that matches word prefixes across app names — so vscode reaches Visual Studio Code — solves this class of problem rather than requiring you to learn each app's official name.
The Launch Services registration tool. Rebuilding its database fixes missing apps and wrong file associations.
Usually a second copy exists — often on an external drive or in Downloads. Launch Services indexes both.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Download for Mac