Possible Adware infection.
You can remove adware using EtreCheck.
Using EtreCheck: https://etrecheck.com/maspro
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.
If you wish, you can post the report here.
Run EtreCheck again.
Scroll up the sidebar and click the “Security” button.

“Adware” and the “Unsigned” files will be listed on the right hand side pane along with a “Remove” button.
Click the ”Remove” button wherever you see “adware”.
Restart your Mac. Launch Safari holding the “Shift” key down.
Choose a search engine.
Google is the default search engine.
Delete all text in the Smart Search field, click the magnifying glass icon,
then choose a search engine from the dropdown list if Google is not already selected..
https://support.apple.com/guide/safari/customize-your-search-ibrwe75c2a3c/mac
