Why is this cane turning yellow?

I have seen it on the tips of stems. They turn yellow for a certain length, then rot to that point.

But I haven’t seen it on a cane like this. I assume they are for different reasons. What should I do with it and how can I prevent this in the future? Another part of this same cane had turned yellow and I just cut it off. You can see where it used to be.

I’ll add that it looks like this cane appears to have damage near the soil line