To be eligible for the American Opportunity Credit, a student must not have completed the first four years of post-secondary education as of the beginning of the taxable year.
The "first four years" refers to the amount of academic credit that has been awarded. Generally, it's what schools use to classify students (junior, senior, etc.). A student who had not received more than four years of academic credit before 2022 would meet the year of study requirement under the American opportunity credit rules.
If you are unsure of whether you meet the year of study requirement, the school will be able to tell you how much academic credit was awarded at the beginning of 2022.
Note that any link in the information above is updated each year automatically and will take you to the most recent version of the webpage or document at the time it is accessed.