Csa2285 wrote:
How can I change my search engine from safari to google and back?
There is no such thing as a "safari search engine". Safari is a browser. Apple does not have a search engine.
If you want to change the default search engine from your iPhone, to go Settings>Safari>Search Engine. The options are Google, Yahoo, Bing, Yandes, DuckDuckGo and Ecosia.
If you want to change your default browser, see my post from above:
It sounds as if you're asking how to make Safari your default browser. If you're using your iPhone, the only equipment you've listed in your post, Safari is the default browser until you change it to something else. To do that you would need, for example to go to Settings>Chrome>Default Browser App and make it the default browser. Then, and only then, would you see the option under Settings>Safari to change it back to Safari as the default.
If you are using a Mac, what version of Mac OS are you running? If you're running Ventura, the directions are not what you described. See here:
Make Safari your default web browser on Mac - Apple Support