I don't see it anymore, but people used to put a google search bar on their website that would use the sitesearch parameter to restrict results to their domain.
It looks like there is a modern alernative - seems a little more complex to get going with which might be why it's not so common.
There used to be a big yellow blackbox server called Google search appliance that you could put in your data center and get internally indexed white label google search.
It’s not common, but it happens. For small sites it should possibly happen more. If you’re working hard to achieve mediocrity, you should put that energy somewhere else where you can at least get to good.
It looks like there is a modern alernative - seems a little more complex to get going with which might be why it's not so common.
https://developers.google.com/custom-search