What should I do in undergrad to get into an Ivy for grad school?

I’m pretty sure I could’ve done high school better. But yeah it’s over and I’m happy with where I’m going this fall.
But I wanna get into an Ivy League college or Stanford for grad school. What should my game plan be?

I could only score 1450/1600 on the SAT. So should I start working on GRE right away so that I can nail it in my college senior year?
How much importance should I give to my GPA? And what kind of extracurriculars should I have to make my application strong?
I’m gonna major in CS and plan to do probably the same in grad school.

An Ivy for CS grad school may not be the best choice.
WOrk hard, get good grades and try to do research with a faculty member.

https://www.usnews.com/best-graduate-schools/top-science-schools/computer-science-rankings

Don’t try to plan your life out too far ahead. At this point you should focus on getting off to a good start in college academically, socially and in any activities you are interested in pursuing. See how you like your CS classes and if you want to pursue that path. Agree that if you can do research with the prof. (not likely to happen freshman) then do it.

Most top grad schools will want excellent grades, essays, recommendations, GREs etc. I would not start studying for GREs until junior year and take them late junior/early senior year.

It sounds like you will be starting college with more seriousness of purpose than you started HS so that should benefit you.