If your iPhone does not charge, ensure that the cable, adapter and the power source work. It is advised to clean the charging port gently to clear out debris. Switch off and on your iPhone or force restart your iPhone. Try a different charger. If it continues, update the iOS or contact the Apple Support, as this might be the problem with the hardware.