Your screen shot shows Chrome browser (not Safari), with a Google search window open.
That would be a function of Chrome browser, and in your screen shot, it shows a Google search engine, using Google's browser. The page is nicely integrated with the browser, and is a likely a setting. That background would be a theme that has been setup for Chrome.
Safari doesn't theme too well, being the built-in browser provided by Apple, and Apple is not known for allowing much theming in the system.
But, your OP seemed to indicate that you wanted to find out how to center the search field in the toolbar. That is simply a matter of balancing the toolbar icons, and positioning it closer to the center.
On the other hand, turns out that's not what you wanted at all. The search box in a web search site may be dependent on settings on the page that you are using.
It wouldn't be a Safari setting, by itself.
If you use Google as your search engine in Safari, then there are settings for you from your Google account, which may help you change the theming that you might have added to that page. Maybe that will help you with the position of the search box on that web page.
Maybe it would help if you showed a screenshot of Safari, showing that search bar where you have it now (?)