What to check
With the console fully off, remove the accessory if safe. Leave a bent or damaged port unplugged and note the device and port.
What your result tells you
If shutdown tracks with an accessory or a particular connector, bring that detail to a USB or board assessment.
Manufacturer troubleshooting and reference
Get help with this issue
PlayStation shutting down during games