You can change your web browser's search engine through the browser's settings on your computer or the app or system settings ...
When your search engine keeps changing to Yahoo, it's most likely a virus, and you can fix it by resetting your browser. Here ...