The PS5's internal memory is built-in, which means you can't easily replace it if it gets damaged. Because of this, you need to be more careful and attentive.
a) In order not to damage the operating system or the SSD memory, you should check the free space, preferably 80 GB - the free space should be left on the integrated SSD so that information can be freely exchanged between the chips and not overheated.
b) If you don't have internal memory, you can add an NVMe Gen 4 M.2 SSD, it is preferable to install a cooled SSD manufactured for PS5, but there is also an alternative, to buy a separate cooling panel for another brand of NVMe Gen 4 M.2 SSD and install it that way.
PS4 - You can use USB 3.0/3.2 speed external hard drive for games, SSD external memory is preferred.
c) In case of system damage, avoid arbitrary intervention, if the warranty period has not passed, contact the warranty service center. If you have a warranty here, it is better to contact a competent service. Maybe one of the SSD chips is getting hot and that is causing the problem.