In case your iPhone is not charging, the first step is to check the cable and charger, as it may be a faulty cable or even dusty/ dirty port. Final solution is to test another charger and outlet to eliminate hardware issues. In the event that does not, use a soft cloth to wipe the charging port, restart the phone, update iOS, or use a force restart. In case it fails, there is a possibility that the battery or the port hardware will require professional health.