Generally, if you paid for qualified education expenses for an academic period beginning in the current tax year or in the first three months of the next year, then you're allowed to take the Lifetime Learning Credit.
Qualified expenses are tuition and certain related expenses required for enrollment at an eligible institution. The course must be either part of a post-secondary degree program or taken by the student to acquire or improve job skills.
Student activity fees and expenses for course-related books, supplies, and equipment are included in qualified education expenses only if the fees and expenses are paid to the institution as a condition of enrollment or attendance.
The maximum Lifetime Learning Credit you can claim in a year is 20% of the first $10,000 of qualified education expenses you paid for all eligible students (or up to $2,000). The credit is reduced (phased out) if your 2022 modified adjusted gross income (MAGI) is between $80,001 and $90,000 ($160,001 to $180,000 if married filing jointly). Since this isn't a refundable credit, the credit can't be more than your tax liability.