Spotlight can search for folders. Just write down the exact folder name in the Spotlight search window and, by using the arrow keys, move over to the item matching your search term with the keyword "Folder" next to it and press ↵. Then, the folder will be opened in the Finder.
If you’d rather open the folder containing the one you are searching for, press Command ⌘+R or Command ⌘+↵ instead.
If the folder you are searching for does not show up in the first few Spotlight search results, press Command ⌘+↓ until you end up in the “Folders” category which would display the search results that are folders.
Addition as of September 21, 2022
Thx for updating your OP by including the settings I have asked for in a comment to this answer. However, I don’t know how to directly provide Spotlight a list of folders it should include in its results, i.e. a whitelist. I am not sure if this is possible at all. However, I think I may have a solution that works for you:
- Create a folder somewhere that you can remember easily later on such as under your home or the Documents directory.
- Create a shortcut (alias) for each folder you wish to be able to search via Spotlight and move the aliases to the new folder you just created. (See the “Create and remove aliases on Mac” Apple support webpage if you are not familiar with aliases in macOS.)
- Select the Other category in the System Preferences > Spotlight > Search Results window.
If you do these, you should be able to search for those aliases through Spotlight by typing in their names and still have only a small part (most possibly) of the files on your computer, and none of the folders themselves, show up in Spotlight given your settings. Aliases are indexed for searching by macOS because they are files themselves.
When Spotlight displays one of the aliases you created in a search result, it will just open it in the Finder when you press return after moving over the alias’s name. However, it won’t be showing the folders themselves pointed by the aliases, or the files or folders inside, assuming they do not belong to one of the categories selected in the System Preferences > Spotlight > Search Results window.
If including the Other category causes Spotlight to show too many files for your taste, you might be able to alleviate that by excluding one or more high level folders from Spotlight using the System Preferences > Spotlight > Privacy window such as the Documents folder under your home directory. Then, of course, the folder containing the aliases should not be placed in the Documents folder.