1. Use the latest release of Malwarebytes for Mac to remove malware/adware installed on your Mac.
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 “Scan Now” button.
Repeat the scan please.
Once done quit Malwarebytes for Mac.
Restart the computer, relaunch Safari holding the shift key down.
2. Additional steps to take, if necessary.
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: 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
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/
6. Shutdown the computer from menu. Start your Mac using the Power button.
If this doesn't help.
Download EtreCheck: https://etrecheck.com/maspro and post the report here.
Click, “Free Download” button and then “Click to download” button,
open Downloads folder, click on it to open, and then select ”Open”.
Click on the bouncing EtreCheck icon in the Dock.
“Choose a problem” from the popup menu box, and then “Start EtreCheck” in the dialog.
Click “Share Report” button in the toolbar, select “Copy report” .
Paste the report when you reply.