Profiles
Remove any profile you have not installed knowingly.
System Preferences > Profiles
Launch System Preferences. Do you see any profiles added to the pane at the bottom, next to Accessibility?
How to remove a configuration profile? https://support.apple.com/kb/PH25680?locale=en_US
Adware/Malware
1. Uninstall all extensions you have not installed knowingly.
Section: Manage extensions: https://support.apple.com/guide/safari/use-safari-extensions-sfri32508/mac
2. 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
3. Set your Home Page. https://support.apple.com/guide/safari/set-your-homepage-ibrw1020/mac
4. Restart your Mac.
5. Launch Safari holding the Shift key down.
6. If the steps posted above don’t help,
use Malwarebytes for Mac to remove adware/malware.
https://www.malwarebytes.org/antimalware/mac/
Install guide: https://support.malwarebytes.com/docs/DOC-1817
Uninstall Guide: https://support.malwarebytes.com/docs/DOC-1190