I5 9400f,8gb ram ddr4,rx 470 4gb and 500 psuFull system specs including psu,model of the HDD.
Describe the issue a bit more.
At what point durring installing a game does the pc shutdown?
Does the pc shutdown when you launch a game?
Is the hdd used or new?
Do you have any other drives?
My friend had a similar problem to yours,we opened up the pc,saw that there were cobwebs in it,cleaned it and the problem was solved.