This question already has an answer here:
I installed a new SSD, formatted it, and Mojave OS was installing when suddenly, the battery stopped charging. All I get now is a picture of a red battery with a low charge. If I remove the adapter, I get a picture that the adapter needs to be plugged in. I tried different outlets. I tried a different adapter. I don't get a green light on the adapters. Reset SMC. Reset Pram.
So it needs a new DC-In board or battery (which apple says is not removable) or both?