Chosen Solution

Hello, I recently replaced my iPhone 7 battery. Before that everything except the weak battery was fine. But ever since , I have put it on charge for more than 5 hours but it hasn’t moved beyond 18% What is wrong and how can I fix it?

If it was charging before the battery replacement it is either a faulty battery or you have nudged a component near the battery connector. There is a small resistor on the SWI circuit next to the battery connector if this has been nudged it can cause the phone not to charge. But I would rule out the battery first.