Computer restarting itself

Sep 20, 2018
2
0
10
Hi.

So I got some new parts for my computer. I put them together on pcpartpicker. Here's the stuff

---------------------------------------------------
MSI B250M bazooka
EVGA GTX 1070 sc gaming
Intel core i5 6600k
EVGA 500B +80 power supply
Ballistix sport ddr4 2666 1,2V
---------------------------------------------------

Yesterday I could play the whole day and it worked fine. But this morning when I logged in and opened steam it restarted and when I logged in again it would just restart again. It does that now. Do I need a better power supply?
 
Sep 20, 2018
2
0
10


It's original from when I bought it. I bought the computer 2012 ish so it's kinda old
I did a complete reinstall of the computer yesterday so my (C: ) and (D: ) are empty (except windows files ofc).