Many of the people you call your close friends now will not be a major part of your life in ten years time. I don't know why I even picked that time frame; it might not even take that long. People move on and life moves on, and as hard as we might resist the idea this is perfectly natural and entirely unavoidable. Every day of our lives we learn and grow, becoming newer and hopefully better versions of ourselves. And so just as these paths of growth can initially connect two people as friends, very few are able to run in parallel forever.
It is important to understand what role each person you know plays in your life, whether you have regular contact with them in real life or view them through the lens of social media. The idea of a person serving a function might seem coarse but we all choose to keep tabs on people for one reason or another and there is always some form of motivation in play. Recognising what these motivations are is the first step toward ensuring you are engaging with people for the right reasons.
We all know a few of people that aren't doing so well. They might have done some things that isolated them from others or perhaps they've even gotten you offside somehow. Like I already noted, the paths of two people can only run beside each other for so long before they begin to diverge as they run off into the distance. But the way that we manage this divergence tells us far more about ourselves than it does about the other person.
If you are keeping track of someone because you pity them or are using their difficulties as a reference point for your own life, you're maintaining contact for the wrong reasons. If you become aware that you are quietly hoping someone doesn't succeed so that you can use their failure to justify your own choices, be wary. If you are hoping someone else isn't happy because you yourself are not happy, something might be wrong. If you aren't prepared to help lift someone out of their difficulties and instead continue to watch them struggle, you need to consider cutting them off completely, for your own sake and theirs.
But mostly your own. We need to be around people who lift us up and whom we ourselves can lift up. Our own spite, pity, jealousy and schadenfreude are destructive forces that make us less significant people. We need to either help out or get out of the way of those who can and will. Any pleasure we think we derive from someone else's difficulties is an illusion. The idea that this judgement can genuinely reassure us is false, hollow and harmful.
Genuine strength of character does not grow out of this sort of reinforcement. We need to know within ourselves that we are making good choices for us and be honest about what those choices mean for our lives. Spending even one minute comparing your situation with someone else's is worse than a fool's errand: nothing can ever be gained and but so much is there to be lost.