I have been treated terribly throughout my entire life.
I've had periods where my life is full of a small amount of meaningful friendships, and that's all I ever had. It's all diminished since those times.
Some people have hurt me greatly, by making me feel insignificant because of the social hierarchy, my physical appearance, height, weight, grades, family dynamics, wealth, or maybe just to generally call me names because they're projecting their feelings of sadness.
I have my own mental issues, so I'm not sound to give advice on everything, but one thing I've gotten over is the bullshit, for the most part.
If someone calls me names, and makes fun of me for something that I can't immediately control (height, wealth, in some instances weight even though long-term I can, I'm just depressed and addicted to sugar).
When people harass me in childish ways, I don't even care anymore. My sister calls me fat all the time, and she has this sense like she's the Ben Shapiro of roasting people, and it just doesn't cut it for me, because it's all childish and meaningless, and while I do have the time for that, it won't be what I'll be spending it on.
Tip: cut the BS. Part of getting good at that is finding out what the BS is. If that means whole relationships, so be it. Reality doesn't care about human sentimentality, memories, or feelings, and that includes between people. If someone is being toxic and they won't stop for long periods of time, you have most likely found BS (or to put it specifically, a narcissistic or pathological liar).