I think the most important thing to keep in mind is selective school admissions are not judgments about your objective merit as a kid.
Selective schools are inevitably balancing all sorts of institutional priorities. They have budgets they need to meet. They have various stakeholder groups they need to try to keep happy, including faculty, coaches, alums, donors, and so on. They have various long term institutional strategies. And so on.
Admissions is then about ultimately putting together a body of diverse students that collectively do a good job balancing all those different institutional priorities. And because they cannot be sure who will accept their offers of admission, they need to take that into account. Like hypothetically if they really want to enroll 5 students of type X that year (and it may depend on what happened with other years, who just graduated, and so on), they can’t just give offers to 5 such applicants, they need to do more to make sure they get 5 actually enrolled as students.
This all explains why great kids get admitted to some schools and not others, and not always in patterns that are obvious from the outside. You have no idea what it looks like from the inside at any given school as they are considering your application, what sorts of institutional priorities they have in mind, what other applicants they are looking at, what competing priorities they have to consider, and so on.
So if they ultimately decide to give you an offer, great, they saw you as a good bet to help them get the enrolled class they are looking for. But if they decide not to give you an offer, it does NOT imply they decided you would not have been a good student for them. It instead just means as they were putting together a list of offers they hope will turn into the class they want to enroll, they ended up placing their bets on some different applicants, for whatever complex balancing of reasons they might have had.
Of course it is perfectly fine to feel disappointed if that happens. But you should definitely not take it as meaning anything very profound about you as a person or student, or even how you would have done at that school. They may well have been confident you would have done well, they just did not have room for you in that particular admit class because of all the different things they had to balance, and the other applicants they ended up choosing for offers.