Here is how to fix an iPhone that won’t charge. First, try plugging the charger into different outlets and if possible try a different iPhone charger. If the iPhone still doesn’t charge, clean any lint out of the iPhone lightning connector port and carefully clean the metal contacts with a little bit of rubbing alcohol. Plug the iPhone into the charger, and it will charge.
Video credits to the YouTube channel owner