The finder search bar will not find files in specific folders. Mac Studio Ventura
For example: In my documents folder I have a folder for business cards. If I'm in the business card folder and use search for "Bob" and click 'name contains:Bob' when it drops down, there will be no results. However if I go to the left side of the window and click 'search: This Mac' all the files on the machine with 'Bob' in the name will show including the ones in the 'Business Cards' folder.
The machine has done this since new (about 2 months). I set it up from a time machine backup from an imac on catalina.
Mac Studio (2022)