My kids are both at A&M currently, senior and a freshman. They both took Spanish in 8th & 9th grade & got the two years of credit needed to graduate. They are both STEM majors electrical engineering and (hopefully) computer science.
They used the rest of their high school electives for AP Chem and Physics, Calculus, Computer Science & coding experience etc. They did not apply to any colleges requiring more than two years of foreign language credit (A&M, Auburn, Georgia, UT Dallas). I suggest talking to a counselor at your high school and also looking at what schools your child will potentially apply to. Neither of mine had Ivy, Rice, Duke or Stanford aspirations. They both graduated from a giant competitive 6A high school in Texas. Good luck!