First clean the laptop of the dust build up inside and put new thermal paste if you have any.
Then remove any programs you don't need.
Then check the ssd with hd tune to see if there are any errors.
Then check the temps of the cpu and gpu when playing games, if it reaches 90 or above then it means that the laptop won't be able to play any games. If the laptop has a mxm slot for the cpu or gpu, you can try and buy the same cpu and gpu but they are hard to source.
Run memtest to check the ram
Run disk cleanup in windows
Log out of any windows based app
Make sure drivers are up to date