Safari/Preferences/Extensions and disable all extension. Quit/reopen Safari and test.
Download this program which was written by Thomas Reed, a long time poster. The program will search for malware/adware The program will do the work for you which makes it easy.
Malwarebytes Anti-Malware for Mac 10.10 and later
Malwarebytes uninstall
Safari – Popup takes over
Safari – Popup takes over (2)
Popup remover – Scam Zapper
Safari popups that won't go away IOS
If the pop-up reloads, force quit Safari (command - option/alt - esc) and reopen with the shift key held down. If that doesn't work, disconnect from the Internet, go to Safari/History and delete the website. Quit and reopen with the shift key held down. Then reconnect to the Internet.
Safari -Tech support scam pop-ups