Hi, I'm Ashik. Welcome to JustAnswer. I'm reviewing your question now, and will post back with your reply ASAP
It is possible that your Mac is infected with adware/malware. Press Command, Option and Esc keys and this will bring Force Quit window. Select Safari and click Force Quit. This will close Safari.
Then hold down Shift key on your keyboard and open Safari. Click on Safari menu and select Clear History and Website Data. On the dropdown next to Clear, select All History and click Clear History.
Then go to this website and download the Malwarebytes Anti Malware application --> https://www.malwarebytes.org/antimalware/mac/
Open Malwarebytes and run a scan with it. This will find all adware and malware on your Mac if any. Delete them.
Then restart Safari. Check if you are getting the popups. Please let me know if that didn't work, so I will continue to help you
Hi there, I'm just checking. How is it going ?