1. There is adware installed on your Mac.
Use 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.
Remove unknown profiles (1), unknown extensions(2), reset search engine (3) and reset Homepage (4 & 5)
listed under Additional steps.
2. Additional steps to take, if necessary (1)
1. Remove unknown profiles.
System Preferences > Profiles
Open System Preferences, click the “Profiles” icon ( a checkmark on a gear) .
When Profiles pane opens, select the unknown profile and click the minus button at the bottom.
2. Remove unknown extensions: Safari > Preferences > Extensions
https://support.apple.com/guide/safari/use-safari-extensions-sfri32508/mac
3. Reset search engine: https://support.apple.com/guide/safari/customize-your-search-ibrwe75c2a3c/mac
Change Home Page
4. Reset Homepage. https://support.apple.com/guide/safari/set-your-homepage-ibrw1020/mac
5. Ref: https://forums.malwarebytes.com/topic/236261-how-to-remove-weknow-malware-and-others/
"If Safari's home page is stuck
In some cases, after being changed by adware or malware, Safari's home page can become stuck. You will be able to edit the Homepage field in Safari's preferences, but the change will not stick. This appears to be a bug, and there is an odd workaround. Try this:
- In Safari, choose Preferences from the Safari menu.
- In the window that opens, click the General icon (if necessary)
- Enter your desired home page in the "Homepage" field, but DO NOT press return!
- At the top of the window, click any of the other icons (eg, Tabs, AutoFill, etc).
- You may see a prompt asking for confirmation for changing the home page. If so, confirm.
- Switch back to the General page and check to make sure the home page has been changed."
Credit:
https://forums.malwarebytes.com/topic/236261-how-to-remove-weknow-malware-and-others/
7. Shutdown the computer from menu. Start your Mac using the Power button.