Go step by step and test.
1. Force Quit Safari, launch Safari holding the Shift key down.
How to force an app to quit on your Mac - Apple Support
About pop-up ads and windows in Safari - Apple Support
2. Startup in Safe Mode.
Start up your Mac in safe mode - Apple Support.
Quote:
It also does a basic check of your startup disk, similar to using First Aid in Disk Utility.
And it deletes some system caches, including font caches and
the kernel cache, which are automatically created again as needed.
3. Clear History
Clear your browsing history in Safari on Mac - Apple Support
Please read the article before clearing history,
this is like a low level resetting of Safari without affecting passwords and bookmarks
4. If Safari doesn't open a webpage or isn’t working as expected
If Safari on Mac doesn't open a webpage or isn’t working as expected - Apple Support