No, both you and your parents cannot claim the student loan interest deduction on your tax returns under these circumstances. According to the IRS FAQ, your parents cannot claim the deduction for student loan interest on their tax return because you were not their dependent at the time they took out a student loan for you. However, you can claim the deduction with respect to the loan that you took out for yourself, assuming you meet the other requirements for this deduction.
The legal reasoning behind this is found in § 221 of the Internal Revenue Code and the related Treasury Regulations. Specifically, § 221(a) allows a deduction for interest paid on a qualified education loan by the taxpayer. However, § 221(c) states that no deduction is allowed if a deduction under section 151 is allowed to another taxpayer for the individual. Since you were not a dependent of your parents last year, they cannot claim the deduction for the interest on the loan they took out for you.
Additionally, the Treasury Regulations (§ 1.221-1(b)(1)) specify that a taxpayer is entitled to a deduction only if they have a legal obligation to make interest payments under the terms of the qualified education loan. Since you and your parents have separate loans, each of you can only claim the interest deduction for the loan for which you are legally obligated to make payments.
Therefore, you can claim the student loan interest deduction for the loan you took out, but your parents cannot claim the deduction for the loan they took out for you.
Sources:
§ 1.221-2. Deduction for interest due and paid on qualified education loans before January 1, 2002.
Instructions for Forms 1098-E and 1098-T (2023)
Instructions for Form 1040-NR-EZ (2019)
IRS FAQ
§ 1.221-1. Deduction for interest paid on qualified education loans after December 31, 2001.
§ 221. Interest on education loans
Publication 970 (2023)