They have to be UNDER 17 on Dec 31. Now you get $500 for other dependent. In 2021 they increased the age to 18 but that was only for 1 year. Now it went back to 17.
You cannot get the child tax credit for a child older than 16. Instead you can get the $500 credit for other dependents for the older one. It goes by their age at the end of 2023. If he was older than 16 at the end of 2023, you get the $500 credit.
https://ttlc.intuit.com/questions/1900923-what-is-the-child-tax-credit
Look at your 2023 Form 1040 to see the child-related credits you received
PREVIEW 1040
https://ttlc.intuit.com/questions/1901539-how-do-i-preview-my-turbotax-online-return-before-filing
Child Tax Credit line 19
Credit for Other Dependents line 19
Earned Income Credit line 27
Additional Child Tax Credit line 28
Being a full-time student does not increase the age limit for the child tax credit. The requirement that the child has to be under 17 applies to everyone. There are no exceptions.