1. Run the latest release of MalwareBytes for Mac to remove malware/adware.
Install guide: https://support.malwarebytes.com/docs/DOC-1817
Uninstall Guide: https://support.malwarebytes.com/docs/DOC-1190
The installer may ask you to allow it in Security & Privacy /System Preference. Allow it.
Click the blue “Scan Now” button.
Once done, scan again. Quit Malwarebytes for Mac.
2. Restart your Mac.
3. Launch Safari holding the Shift key down.
Additional steps if necessary:
4. Uninstall extensions you have not installed knowingly.
Section: Manage extensions: https://support.apple.com/guide/safari/use-safari-extensions-sfri32508/mac
5. Choose a search engine.
Delete all text in the Smart Search field, click the magnifying glass icon ,
then choose a search engine from the dropdown list.
https://support.apple.com/guide/safari/customize-your-search-ibrwe75c2a3c/mac
6. Set your Home Page. https://support.apple.com/guide/safari/set-your-homepage-ibrw1020/mac