If you have not done this already, please try it.
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 Login item.
System Preferences > Users & Groups > Login items
Authenticate and unlock the lock.
Highlight the unknown login item (Mac Mechanic?) and click the “-“ button at the bottom left to remove it.
3. Remove unknown cookie/cache
Safari > Preferences > Privacy
“Remove stored cookies and data: Click Manage Website Data,
select one or more websites, then click Remove or Remove All”
Manage cookies and website data in Safari on Mac
4. Temporarily move Safari Bookmarks.plist to Trash and test.
Backup your Mac.
Empty the trash.
Hold the option key down and click “Go” menu in the Finder menubar.
Click open the Safari folder.
Scroll down, right click on Bookmarks.plist and choose “Move to Trash”.
Restart and test.

If this doesn’t help, “Put Back” the Bookmarks.plist
Right click on the Trash icon in the Dock and select “Open”.
Right click on the Bookmarks.plist and select “Put Back”.
Select ”Replace” from the dialog when it appears.
5. Shut down the computer from menu. Restart the computer.
Launch Safari holding the shift key down.