1. Remove any Profile you have not installed knowingly.
Profiles
System Preferences > Profiles
Launch System Preferences. Do you see any profiles added to the pane at the bottom?
If you see Profiles listed, click on it.
When the Profiles pane opens, select the profile and click the â-â button at the bottom left corner to remove it.
How to remove a configuration profile? https://support.apple.com/kb/PH25680?locale=en_US

2. Safari > Preferences > Extensions
Select and uninstall all extensions you have not installed knowingly.
Section: Manage extensions: https://support.apple.com/guide/safari/use-safari-extensions-sfri32508/mac
3. Choose a search engine.
Delete all text in the Smart Search field, click the magnifying glass , then choose a search engine from the list.
https://support.apple.com/guide/safari/customize-your-search-ibrwe75c2a3c/mac
4. Set your Home Page. https://support.apple.com/guide/safari/set-your-homepage-ibrw1020/mac
If this doesnât help, please run EtreCheck and post the report here if you can .
https://etrecheck.com
Click âFree 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 to Clipboardâ .
Paste it into the reply.