The reason why iphones stop charging while charging is likely to be:
First, the charging interface fault, either the fault of the mobile phone, or the fault of the data cable, you take a new data cable to try it, if it is the fault of the mobile phone, you have to replace the excuse.
Second, there may be a problem with the mainboard of the line connected to the battery. It's best to take it to a phone repair shop and have it tested.