PC ShutsDown after few hours of usage

Sep 3, 2018
2
0
10
For some reason my [strike]cpu[/strike] PC shuts down automatically after a few hours of usage and does not turn back on for some hour and then after some hours it turns on and the same thing happens
Brief pc specs - i7-8700k
Mobo- z370a pro
Need help asap
Thanks
 
Sep 3, 2018
2
0
10
I7-8700k
Msi z370a pro
Corsir 16gb ddr4 ram
1tb hdd
Cabinet coolermaster box lite5
Smps cooler master mwe450
Cpu Cooler master h100i
This system was built on 14th april 2018
And this shutdown things happen when i am working or playing some game