Hi,
Based on your PC's specifications, it might be overheating; to start, check the air vents around the laptop to ensure they aren't obstructed.
Test the device using only battery power and then with the charger connected to see if the freezing still occurs.
I also recommend going to Start > Settings > Windows Update > Check for updates and installing any pending updates.
Open the Command Prompt (as administrator) and run the following commands: sfc /scannow and dism /online /cleanup-image /restorehealth. Wait for the process to complete and then restart your computer.
Next, perform a clean boot and uninstall any applications you do not use.
Test the system to see if the freezing persists after following the steps above.
Do not attempt any hardware-related procedures—especially on a laptop—if you lack experience or if the laptop is still under warranty.
Thanks