PS4 loses video signal after some time

Few months ago my friend found his old ps4 while moving so he gave it to me.

I started console worked fine beside needed to be dusted. I did notice a smell of cat pee on uppon opening bottom side so i cleaned it as much as i could. Ps4 worked fine for cuple of months till recently when i changed hdd to ssd i found it acting up (does same when old one is in).

Heres where we get funky
-installing os

  1. I plug in controller get to installing os loses vid signal controller turns off
  2. Do the same but loses signal after i turn on controller
  3. Same path loses signal after i press ok to install

With these stuff before it had games chrashing issue but those codes send me back to reset it.

What could this be?
How this happens?
Is repair worth it?