To answer OP’s original question: for my oldest son, it was obvious the course he was on because he was so advanced (but meandering in his homeschooled education), beginning algebra in 2nd grade. However, we weren’t looking at selective colleges until we realized he’d taken too many college math and physics courses to go to the Christian colleges we’d looked at. It was only in his soph/junior years in high school that we realized he needed schools that had advanced math and physics. He began studying Calculus in 7th grade, but took it formally in 8th. He’s graduating from MIT soon.
For my middle son, no way would his middle schools years have predicted that he’d be attending an Ivy! He was behind, late blooming, and dealing with a host of health issues. I wasn’t sure he could even attend college as late as sophomore year. However, he had some natural abilities that rose to the top, one of them being tenacity. He did not do APs (took two, but bombed them); he did CC classes in junior and senior year. He took Calc I in spring of senior year. He was considering STEM, but with his math disability, he moved away from that.