My iPhone restart when I charge it and dont increase presentege

I have iphone 5 16 . It was working fine when I got it, then a couple weeks later it started acting weird. It would start restarting every couple minutes every time i plugged it into the charger. Also, the percent # gets stuck at a number and never changes until the phone dies.all that happend when i replace the battery and flex of volume

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0