Hal_Al
Level 15

Education

Page 21 of Pub 970 says:

Refundable Part of Credit
Forty percent of the American opportunity credit is refundable for most taxpayers. However, if you were under age 24 at the end of 2020 and the conditions listed below apply to you, you can't claim any part of the American opportunity credit as a refundable credit on your tax return.
Instead, your allowed credit (figured on Form 8863, Part II)
will be used to reduce your tax as a nonrefundable credit
only.
You don't qualify for a refund if items 1 (a, b, or c), 2,
and 3 below apply to you.
1. You were:
a. Under age 18 at the end of 2020, or
b. Age 18 at the end of 2020 and your earned income (defined below) was less than one-half of
your support (defined below), or
c. Over age 18 and under age 24 at the end of 2020
and a full-time student (defined below) and your
earned income (defined below) was less than
one-half of your support (defined below).
2. At least one of your parents was alive at the end of
2020.
3. You are filing a return as single, head of household,
qualifying widow(er), or married filing separately for
2020

https://www.irs.gov/pub/irs-pdf/p970.pdf

I think it's also on the instructions for form 8863.