I attended underfunded rural public schools as well. The funding of a school district will often correlate with student performance, but in most subjects, it's not a causal link.

Kids with families who value education do better. Kids with parents who punish them if they don't do their homework do better.

When you isolate for income, there are large discrepancies in success between various cultural groups. Appalachian whites (my family) don't do well compared to many groups of the same income. The culture doesn't prize education, and even views it as being effeminate or "selling out". But that's only a small piece. A big piece of it is that parents don't give a shit about their kid's success in school, and that is very big in certain cultures.

My wife is the daughter of Filipino immigrants, and from the day my son started 1st grade, if he doesn't get all As, the attitude is that he has failed. At one point, I was going to argue with her, but I looked at my siblings, and my cousins (primarily white trash losers), and then looked at her family's success, and decided that she knew something I didn't.

My son has a TV and an Xbox in his room. The controllers and remotes are all kept locked away in my closet. If he doesn't get straight A's on his report card, all of it stays locked in my closet, even on weekends. We did this in the Fall of 2020 when he got all A's and a B+ in one class. He went all of the spring semester with no access to his TV or video games. He got them back in the summer after getting straight A's on his report card. (He's a 10th grader now). Contrast this with my poor, white working class siblings and how they raise their sons. My sister frequently complains about how bad her son's grades are (he's the same age as my son) and throws her hands in the air as if she's unable to do anything about it. He has multiple game systems in his room, and the last time I visited, when I woke up to take a piss, his light was on and he was playing games at 3 AM. This was a day after she had complained about his low C average. She coddles him, has low expectations for him, and ignores her own obvious parenting failures. She's a great representation for why so many American public schools are filled with thoroughly mediocre students.

If you have kids, get the fucking electronics out of their hands. If they aren't bored and regularly bugging you about being bored, it's probably because they are being entertained by their smartphones or video games, and you are fucking up as a parent.

Look at Nigerian American parents, or Asian American parents. Instead of doing what my redneck sister and many others do, and rationalizing the obvious differences by assuming that "they are too strict and are raising maladjusted nerds", imitate them. They will happily share their parenting strategies with you, and rule number one is that they aren't their kid's friends. They don't give a shit if their kids like them NOW. They care if their kids will like them when they are winning as adults.

Far too many successful people I meet complain about their parents being too hard on them, never stopping to look around at their current success and realizing that their parents made it possible.