Hello rdsinca24,
Welcome to Apple Support Communities. We suggest using these instructions to help with this trouble you're having with Safari:
If adware or other unwanted software is installed on Mac
If you see pop-ups on your Mac that just won’t go away, you might have unintentionally downloaded and installed adware (advertising-supported software) or other unwanted software. Certain third-party download sites might include software that you don’t want along with the software that you do.
If you think that you might have malware or adware on your Mac:
•Update to the latest version of macOS. If your Mac is already using the latest version, restart your Mac. macOS includes a built-in tool that removes known malware when restarting.
•Check your Applications folder to see if you have any apps that you don't expect. You can uninstall those apps.
•Check the Extensions tab in Safari settings to see if you installed any unnecessary extensions. You can turn extensions off.
Complete. details, as well as further troubleshooting tips are found in the Apple Support article:
Block pop-up ads and windows in Safari - Apple Support
If you are unsuccessful, get in touch with Apple Support for further assistance:
Apple Support
Take care and stay safe.