Hi,
Force Quit Safari ( command + option + esc keys). Then restart Safari holding the Shift key. Then Empty the Caches (Safari menu > Preferences > Privacy > Remove all website data. (This will also remove history if you do not want to remove History open Safari Preferences > Advanced and check mark “Show Develop Menu” then choose “Empty Caches” from Develop Menu ).
Then go to Safari Preferences > Extensions and check there. If there is an extension delete it.
Download and run Malwarebytes
Free Cyber Security & Anti-Malware Software | Malwarebytes
Avoid opening or downloading items from email messages and websites unless you are certain that they come from a legitimate, trusted source. If you’re uncertain about the source, delete the item.
Hope that helps and have a nice day