1. Remove Adware
Run the latest release of Malwarebytes for Mac to remove malware/adware, if installed on your Mac.
For instructions: Install Malwarebytes for Mac Uninstall Malwarebytes for Mac
Click the “Scan Now” button. Once done, quit Malwarebytes for Mac.
Restart the computer and relaunch Safari holding the shift key down.
Repeat the scan couple of times.
2. Additional steps to take if necessary
1. Reset search engine: https://support.apple.com/guide/safari/customize-your-search-ibrwe75c2a3c/mac
2. Reset Homepage. https://support.apple.com/guide/safari/set-your-homepage-ibrw1020/mac
3. Restart your Mac. Relaunch Safari holding the Shift key down.