iMac issues with installation OS and running

Hello dear community!

I am facing the weirdest issue with my friend's iMac 21 - 2010. He gave me his computer to install an SSD drive and ram memory. But after the installation, I am experiencing those problems that I've never had before in my entire computer fixing experience. I already spent a week trying to find a solution and still didn't find it. So, let me started.

I replaced an SSD as I usually did before. However, for some reason, when I started to install MacOS High Sierra, at the end of every installation, I start getting an error that system can not be installed on this computer. I've tried everything, even installing the Sierra. One time it went thru but then I decide to try again with High Sierra, and after that even Sierra decide not to install.

After that I decide to trick a computer and did an installation of MacOS High Sierra from another computer via the usb cord. The system did install. And I installed the SSD back to the iMac. It turned on and I did all the setup process for the account. But as soon as I connect a wifi, computer shuts down. When it turns on again, I decide to check an updates hoping that they will fix the problem. I got very wrong, because the update failed with a message that can not been installed. And after that system started to restart every single time when I logged in the account. The only way system was working was in safe boot mode but with turned off wifi. As soon as I turned it on, computer restarts again.

Please, please help! I already used all my knowledge and search the whole web but didn't find any solution!

Thank you in advance!

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0

crwdns2942205:01crwdne2942205:0:

could it be some sort of safety switch triggered by lost my Mac?

crwdns2934271:0crwdnd2934271:0crwdne2934271:0

crwdns2934285:0crwdne2934285:0