Chosen Solution

My iPhone 5 is dead, if I connect it via lightning cable to the mains, it works normally, what happened since I replaced the battery in January?

The iPhone may be water damaged, or the replacement battery was of low quality. First try replacing the battery again. if that does not work, then try replacing the logic board. Logic boards for the iPhone 5 aren’t too expensive, since it is a very old iPhone model.

I would recommend using a battery brand called crazy