As the other user commented, try checking the connections between the logic board and the charging port to see if anything is loose. Otherwise ensure that the charging port itself doesn’t have a build up of dust in the port, but if it does you can simply clean that out with some tweezers and a steady hand. I usually find most cases of no charging can be resolved by cleaning out about a centimetres worth of dust.[br]
If the port is all clean, the connections are all clean and secure, the charging port may be faulty and need to be replaced, but it may be worth taking the device into a reputable repair shop for a diagnosis.