This has happened to me at least twice and it’s taken too long to realise each time. Further, even if you think you’ve cleaned it, it can need more. I’ve had to scrape away at it before it will charge, and even then sometimes only at an angle or with a book resting on the cable/connection. Given it’s not OP’s issue, hopefully these posts help someone else.