Ended up happening to my old IPad, I have replaced the battery which worked for a bit, then it stoped charging so I ended up just getting a new one, got the IPad 7gen it was really cheap and thought better of buying a new one
Check your Original charger brick, should say everything need to buy a replacement. usallly amazon works, but research with the code found on the brick