Thanks to my buddy Curtis for letting me know about cleaning your iPhone’s charging port.

Solved my problem of my phone not charging.