I mean unplug everything, take out everything out of the case, including the motherboard. Empty case, nothing in it. Then put it back together, outside of the case. All the parts, put them together outside the case. We need to see if the case is an issue.
If everything works fine then it's the case. If it still turns off then take off a ram stick at a time and text each part to see what the issue is.