This is a common issue due to overheating. To fix this, try to reduce the CPU usage and clean the laptop as there might be dust in the vents.
open