The IRS site has the caution: "If your gross income was $5,050 or more, you usually can't be claimed as a dependent unless you are a qualifying child. " He seems to be a qualifying child, so why does TurboTax say he earned too much?
Review your answers for claiming him as a dependent in the My Info section of the program.
You needed to select that he lived in your home for the Whole year, that he was a full time student, that no one else in the home provided support, that you provided over one-half of his support. that you did NOT check the box labeled "not valid for employment" in the Social Security number section, that he did not earn $5,050 or more in 2024,
If all of your answer are correct then delete him as a dependent and re-enter.