Study as much math and science as you can in high school. In college, study what you are good at. And you’ll find out what you are good at when you are in college.
NASA needs all kinds of engineering and science specialties; mechanical, aerospace, materials, electrical, chemical, astronomy, human factors, and many more.
I was a civil engineering major studying structural analysis in college and had a 40 year career working for a NASA contractor on manned spacecraft. I also did some consulting directly for NASA after I retired. FYI; Only a few of the engineers I met along the way actually majored in aerospace.
The big thing (as alluded to by eyemgh) is that NASA and NASA contractor jobs are highly sought after. Therefore, the compitition for those jobs can be tough. Challenge yourelf and get good grades in college to make yourself have a better chance.