How to fix my apple charger?

I have an iPhone 5s and my iPhone charger is broken. It only charges when my phone is at a certain angle and that angle is really hard to find. I've wrapped my entire charger in yarn to protect it, and it didn't work. Does anyone have any tips on how I can fix it or should I just buy a new one?

My iPhone charger did the same before, I took my phone and charger into the mts shop and the worker told me to send it away so specialists could look at it. Go to the store you bought it at and tell them what's happening, either get a new charger and see if it happens again or send it away to get fixed

It's beyond repair, you need a new one.