Hi sargunan227,
Thanks for posting in Apple Support Communities! Since you're having issues with Safari, we suggest ensuring macOS is updated to the latest version. Here's how to update:
To check for new software, open Software Update. It's in System Settings (or System Preferences), which you can open from the Apple menu in the corner of your screen:
* Choose Apple menu > System Settings. Click General on the left side of the System Settings window, then click Software Update on the right.
* Or choose Apple menu > System Preferences, then click Software Update.
Outdated software can cause things to misbehave. Find the above steps in the article Update macOS on Mac.
Should it continue, test the behavior in safe mode to help isolate the cause: Use safe mode on your Mac.
Cheers!