Unless you have a specific HOOK (which includes, legacy, URM, being a great athlete, a big donation etc.), aside from very good objective data, you simply somehow have to make the ADCOM reviewer CARE about you. You have to somehow get the teachers who write LoRs for you to present you as a real person that they like, not just a student who is an awesome student.
Now, here’s the clincher: even if you do all of the above, you still might not get in because others did better jobs than you. It can hurt your ego to admit this, but some people probably did better job at connecting with the ADCOM reviewer due to their effort and some luck. It happens. You can’t be great at everything.
Now, here’s another, even bigger clincher. Even if you don’t get in and you end up going to other options, i.e., Honors College with merits, your state school with cheaper state tuition etc., you have no disadvantage in pursuing what you wanted to do at Stanford and being very successful at it, if you are really motivated.
What’s really important is your attitude and your dedication. You are the same you no matter which school you attended.
Case in point: A kid with very high stats (near perfect GPA, 1550+SAT and NMF) didn’t get into any top college and went to a mid level UC. He did very well in CS there, got a great job in cyber security with a top govt agency, a job many kids at top colleges would love to get.