Try downloading this program which was written by Thomas R, a long time poster. The program will search for malware/adware. The program will do the work for you which makes it easy. It may be necessary to run more than one scan. After running the scans, restart the computer.
Malwarebytes Anti-Malware for Mac 10.10 and later
Malwarebytes uninstall
If necessary, follow the manual instructions. Do not download any other programs that are listed in the articles. Malwarebytes uninstall
Safe Finder Uninstall
Safe Finder Uninstall (2)
Safe Finder Uninstall (3)
https://www.2-spyware.com/remove-bing-redirect-virus.html
How to get rid of Bing.com Redirect - Virus removal guide
See if the below helps. I would scroll down to the below or you might fall asleep.
Step 1. Eliminate Yahoo Redirect from Windows
Step 2. Delete Yahoo Redirect from Mac OS X
Step 3. Uninstall Yahoo Redirect from Internet Explorer
Step 4. Remove Yahoo Redirect from Microsoft Edge
Step 5. Erase Yahoo Redirect from Mozilla Firefox
Step 6. Get rid of Yahoo Redirect from Google Chrome
Step 7. Eliminate Yahoo Redirect from Safari
https://www.2-spyware.com/remove-yahoo-redirect-virus.html
Go to Safari Preferences/Extensions, uninstall any you don't recognize, and then turn all extensions off. Test. If okay, turn the extensions on one by one until you figure out what extension is causing the problem.