Go step by step and test.
1. Update Safari, if an update is available. Update may come with bug fixes.
https://support.apple.com/en-us/HT204416
2. Quit Safari, launch Safari holding the Shift key down.
https://support.apple.com/en-us/HT203987
3. Startup in Safe Mode. https://support.apple.com/guide/mac-help/start-up-your-mac-in-safe-mode-mh21245/mac.
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.
4. Clear History
https://support.apple.com/guide/safari/clear-your-browsing-history-sfri47acf5d6/mac
Please read the article before clearing history,
this is like a low level resetting of Safari without affecting passwords and bookmarks.
5. If Safari doesn't open a webpage or isn’t working as expected
https://support.apple.com/en-us/HT204098
6. Reset PRAM: Reset NVRAM or PRAM on your Mac - Apple Support
Settings that can be stored in NVRAM include sound volume, display resolution, startup-disk selection, time zone,
and recent kernel panic information.
The settings stored in NVRAM depend on your Mac and the devices that you're using with your Mac.
7. Contact Apple.
If steps posted above do not help,
Click inside the box to choose an option.
https://getsupport.apple.com/?caller=kbase&PGF=PGF63005&category_id=SC0245&symptom_id=23362