I’ve read that it could be a worn out USB port and it’s quite a job to replace it as I don’t have a heat gun but do have a soldering iron. Could the battery be worn out? Replacing the battery appears to be relatively easy.
I have a model SM-T350 that’s a few years old. If the battery is low, it will charge to about 50% and then not go any further. I’ve cleaned the USB port, bought a new charger and USB cable. It charged to 100% a few days and I thought it was fixed but now it’s back to only charge to 50%.