Computer shuts off randomly when launching game

It can be caused by MSFS but still due to the PSU or cable connectors. MSFS puts quiet some load on your rig, easily possible that without the load of MSFS, you recognize no issues… Do other heavy load games work flawlessly?