Normally you are not friends with the same people your whole life. As you grow you gain and lose friends. Losing a friend just shows your growth. Friends will come and go, whenever they leave it just shows that you both are not on the same page.
Not everyone is needed to help continue your journey in life. The ones who stick around to support you are the people you can trust. Don’t look at the loss of a friend as a bad thing, look at it like something that comes with bettering yourself.