Question Pc shuts down after 3-4 mins of gaming!

Mar 13, 2019
3
0
10
Recently I changed my motherboard because of faulty ram slot, I replaced my mobo then it was all good then after 2 days the problem started, whenever I launch any game(apex legends or csgo or pubg) it starts and ui loads, but when i connect to match pc shuts down but fans keep spining, sometimes it restarts on its own sometimes it doesn't. at first i thought its a temperature issue, so i checked my cpu and gpu temp. While idle cpu was 55-60 degree celcius and gpu 40-50 degree celcius. But when entering a game cpu temp crosses 95 degree everytime. So i thought its a cpu cooling issue. So i replaced my stock cooler and added cooler master hyper h410R. Now while playing games my cpu temp stays 45-50 degree but the thing here is after 4-5 min pc still shuts down whatever games i play. My pc works fine when im not playing games.
my rig:
Cpu: i5 4590 @3.30GHz
gpu: NVIDIA gtx 960
ram: 2 8gb ddr3 (1600 MHz)
mobo: gigabyte H81m-s2pv
os: windows 10
psu: corsair vs450
cpu cooler: cooler mastter hyper h410r
DirectX Version: DirectX 11
Hard drive: toshiba 1tb

plz help me out here, its really bugging me a lot