On boot up if mem self check comes up probably ok.
I see them rarely fail. Mem test is a good program.
Download free program for CPU check.
Download free software to check hard drive.
How long have you had your computer? Couple of years?
Unplug ,wait a while for discharge, take off cover and safely (look) around too see if it has collected alot of dust especially around CPU fan and on motherboard.Get a blower and blow it out.
Check power supply too.
Make sure all fans are spinning and unobstructed.
Hope this helps,