JonathanAHoe wrote:
What do you make of the image?
Looks like there's been a lot of flexing, and the yellowing is typically from excessive heat or exposure to oils or other substances that make it yellow.
But regardless, a frayed cable is typically not eligible for warranty or AppleCare replacement. I specifically remember that from a time I brought in a cable that worked intermittently to ask if it might be replaced. I just needed to show that I had an active warranty for a device that included that model of cable. Since I covered it with shrink wrap (my way of protecting it) the supervisor wanted to see what it looked like underneath and said that if there was anything exposed it wouldn't be eligible.
I have done some repairs to a cable, but that was with my MagSafe one where there's a captive cable. Someone accidentally placed a chair on it and tore through the jacket, but it was otherwise intact. Just a little electrical tape and it was fine. Unless there are a lot of frayed braiding wires popping out, it's generally OK to just patch up and use.
If it's a USB-C cable (can't tell from the photo) then it's OK to use an inexpensive charge cable unless you need more than maybe 60W. USB-C cables are at a minimum rated for 3A and 20V is a common power adapter voltage for notebook computer power adapters.