American Opportunity Tax Credit Unclear

So, I graudated High School in 2017.

At community college: 

 

I took dual enrollment classes spring of 2016- 2 classes.

In Fall 2017 I took 5 classes.

Winter of 2017 I took 2 classes.

Spring of 2018 I took 5 classes.

Fall and Spring of i took 1 class for 1 unit (band) in a community college program.

 

I transfered to a university in fall 2019 and took classes all the way through Spring 2022 (Which i earned my degree).

I recieved cal grant all of the years, at jr college was covered under pell grants and had deferred calgrant. 

I have never claimed the American Opportunity credit and dont know what to do. Some people say I have been in college for more than 4 years while others say that with the time off and the random band courses dont count.