Random shutdowns with a delay before it'll boot again are pretty classic signs of power supply trouble, especially if the fan and temps are fine. The PS5 power supply can go wonky without obvious warning - it'll fail to deliver steady power under load, so games push it over the edge. Before you assume that's the culprit though, try a few things first. Unplug the console completely for like 30 seconds, then plug it back in and see if that helps. Also make sure you're not using a power strip or extension cord; plug it straight into the wall outlet if you haven't already. Sometimes a flaky connection or underpowered strip causes the same symptoms.
If those don't fix it, check whether the console is in a tight enclosed space where it can't breathe properly - even if the fan sounds normal, poor airflow can trigger thermal shutdowns. Move it out into the open for a test run. You could also try a different wall outlet in another room to rule out a problem with your electrical circuit. If it keeps shutting down no matter what you do, yeah, the power supply is most likely the issue and you're looking at a replacement. Sony can send you a replacement unit if it's still under warranty, or you can grab a third-party one if it's not.