A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Considering the question is about the default built in search functionality, this isn't a very helpful answer, It would be more useful to ask more about where the op wants the search to appear. Obviously, if you're IN a library the search is limited to that library but there's no way to specify filters to a library from the default search box. My advice would be to look into the PnP modern search web parts which are made by non-Msft 3rd party developers and are therefore far more flexible and useful. https://microsoft-search.github.io/pnp-modern-search/