For this symptom could be many reasons. Most of them are software.
First of all if it started few days ago you can try "system restore" ( i don't like it, but that is the easiest way to go)
As far as hardware, check your CPU/Chipset/GPU temps.
With software...hmm well you can start by scanning your computer with malwarebytes, and some on-line scanners like bitdefender.
Temps fine and no hits with the scaners....try to update VGA drivers or better swap the VGA card, that if you have one some ware...second computer my be...
If nothing helps let us know.
Note....you have here general (universal) solutions. That the best i can do with information i have. Check your logs, who knows you might find something.