PS4 pro blinks blue and ps logo comes up on screen then freezes and turns off

My PS4 pro has been lagging and freezing so I attempted to troubleshoot. Rebuild database and so on. The last thing I did was initialize and after having done that my PS4 pro turns on and the PS4 logo pops up then the screens goes black and the PS4 starts to blink blue. Eventually turning off after a few minutes. Not sure where to go from here…I was thinking about changing the hard drive but I’m not sure that’ll help.