HI OP, I didn't want to read and run. I am not a regular on this board but wanted to say that I can understand it feels awful to feel left out or like you are less important than another friend.
You know what? It's their loss and I don't just say this as a cliche.
You sound like a caring friend and maybe your two other friends just have something in common that you don't share, or they spend their time gossiping and talking about stuff that is quite boring.
Don't judge yourself by leaving school without friends. I had a best friend in school who was super toxic and it was very detrimental to my confidence for many years after. We are no longer friends.
If you feel that you gel with people but it doesn't go beyond a certain level, maybe you need to look for people in other places, either though shared hobbies or interests? Many of us don't have a big circle of girl friends for lots of reasons, lack of time nurturing these being one.
Look ahead, not backwards, things may still change and you may find closer friends in unexpected places. My mum always felt on the outside, her whole life, she found her BFF at 45 and the 2 of them are meeting up today for a city break aged 78 and 73. They used to be colleagues.
Hang in there and do not judge yourself! 💝