There could be a few issues wrong with it:
- Could’ve hit water.
- Internal wire or cord could’ve gone loose; know how to fix it by any chance?
- You may’ve bent the tip of the wire.
You bought a cheap and, above all, uncertified charger from an untrusted company.
Most things in the US, if not all, are certified by the UL (there should be a sticker on your device if its certified; kinda hard to take them off, too.)
Here’s an example of an issue with it:
If you leave an uncertified charger plugged into a phone overnight, you may just wake up in a hospital and take a good ‘ol trip to your burnt-down house because the charger wasn’t safe.
UL-certified products are designed to not burst into flames, and i’m surprised that your device lasted a month (average time length for a $1–2 pair of earbuds.)
Uncertified products, well, will end up like this if they go past a month: