You can try using a different charger or trying to clean the port, it may even be related to the battery. I would take it into the store for further analysis.
Try cleaning the charging port
I would take it to the Apple Store in the mall they are excellent
Thanks! Your answer is awaiting moderation.