Having a large amount of temporary or cache files can take up valuable memory.
Once you’ve installed these updates, reboot and try your computer again to see if Windows continues to freeze. To see if your machine needs that update, press Win + I to access the settings, then click “Update & Security.” Any upgrades or bug fixes your computer requires will be listed here. Sometimes Windows itself will need an update. Run this first to make sure it isn’t malware causing the issue. If Windows Defender didn’t detect anything, consider using another antivirus software such as Kaspersky, Norton, or Avast to double-check.
If your computer is having problems, it is always a good plan to first run a scan for viruses.