Lightning Global Search isn't going to be customizable to your needs. Your exact request is actually an idea you can upvote: Global Search filters per object. It's 10 years old so I wouldn't hold off hope for it, but in recent trends there does seem to be some customization opening up with regards to Global Search as Winter '22 has two beta features:
- Give admins the ability to control which objects users see.
- Scoping Rules
Reduce noise and unnecessary searches while enhancing your users’
productivity. Based on criteria that you select, you can set rules to
help your users see only records that are relevant to them. By adding
a scoping rule, you can help users focus on pertinent records and
prevent them from accessing records containing sensitive or
inessential information.
There's potential with the above beta that you could remove accounts for certain profiles and have them interact with a LWC/custom component that applies your filter behind the scenes. I'd advise against that as the global search is everywhere and it's better to hide the records from them across the platform versus only in one specific area/feature if that's your concern.
Scoping rules, in particular, could meet your use case.
In the end, however, you answered your question yourself - If a certain group isn't supposed to see specific records, the tool at your disposal is OWD/Sharing rules which will play well across the platform unless either of the betas above become GA and meet your need.