Black screen after login
Recently my Mac has been shutting off randomly and not turning back on for a minute or so. After it turns on the login screen and start up chime appear/sound.
This started happening on the last update of macOS Sierra and now in Catalina it persists.
The only thing I have done to this computer is tighten the screen hinge and upgrade the RAM from 4GB to 8GB back on macOS High Sierra. My anti-virus software (trend micro titanium) detects no problems with my files and I haven’t visited risky websites
What could be the cause and solution. Please help.
P.S. A bit more information, I though the battery connection was bad so I reseated the battery connecter but the problem also happened when I had the MagSafe charger connected and CoconutBattery shows no error codes.