File Explorer search searches the current view. If you type a search term when File Explorer is open showing This PC, all internal and external drives and all folders in them are searched.
To search only the drive C:, double click the drive C: in File Explorer > This PC view to open the C: drive and type your search term. Windows will now search only the current drive C: and all its folders.
Rule: Windows Search when used in File Explorer searches the current drive or folder and all its subfolders, nowhere else. To search only in your user profile folder and its subfolders, open C:\Users\Your_Username in File Explorer and do the search. To search only in external drive X:, open X: in File Explorer and search.
Kari