Copied from IRS Tax Topic 601:
"Have a qualifying child who meets the age, relationship, residency, and joint return tests, and isn't treated as the qualifying child of another person. Or, if you don't have a qualifying child, you must:
be age 25 but under 65 at the end of the year. However, for 2021, there is no maximum age limit for eligible workers. In addition, for 2021, the minimum age limit is 24 years of age for a full-time student, 18 years of age for a qualified former foster youth or a qualified homeless youth, or 19 years of age for all others;
not qualify as a dependent of another person; and live in the United States for more than half of the year."