That's just a cli for Spotlight, right? I have found Spotlight to be increasingly unreliable over the years, to the point of being essentially useless now. Most recently, I discovered that absolutely nothing in my iCloud drive can be found with Spotlight, even if the file is on disk and I'm just trying to match its name. For extra fun, I found an Apple support page that suggested the Windows-in-1999-esque procedure of blocking and then unblocking the directory from indexing in the Spotlight preferences. Unsurprisingly, this didn't work.
Testing out mdfind and trying to simply find a file in a specific directory (which only contains five files):
mdfind -onlyin . name-of-my-file.md
Nothing.
mdfind -onlyin . -name name-of-my-file.md
Nothing.
mdfind -onlyin /absolute/path/to/cwd -name name-of-my-file.md
Nothing.
This is pretty reflective of my experience with the Spotlight GUI. Every search turns up something, but the file I want is almost never in the results.