Have to say, I’ve been puzzled also, as previous shifters had rubber port, but can’t see anything on the new shifters (X1 and X01 in my case). Though I’ve not needed to yet. Guessed that it would involve unscrewing the cover. Suppose I could RTFM but that’s going too far 😀
Frayed cable? The actual gear cable, just after the clamp on the mech? If so, that won’t affect anything. It’s not nice to look at, but nothing else. If some of it after the clamp isn’t frayed, cut shorter and stick an end cap on.
If you mean the outer has frayed (due to no ferrule?) then replace outer. Inner might be rusted up if it’s been exposed for a while and water in there, so potentially the gear cable itself also. Get ferrules also if missing.