The payment goes to what is due at the time. There is no separation of what is owed when it is due. It is all a lump sum at that point.
It does not go specifically to the phone or to the Airpods, it pays the due amount in total, whatever it is.
If you pay more than what is due that month, then it subtracts from the complete sum of what is owed. i.e the entire balance. Whether it's owed entirely in that month or not.
Link-> How to make Apple Card payments - Apple Support
The monthly balance includes all of your spending in a calendar month (except for any pending transactions), interest charges, and credits posted to your account. It also includes any remaining balance from the previous month. If you have Apple Card Monthly Installments, your monthly balance includes your interest-free monthly installment. When you pay the monthly balance, it stops additional interest charges on your account.
You owe it all at once. If you pay early, it goes to whatever is your total balance from the sum of all installments and any charges you have made that month.
If you owe $1000 dollars on the iPhone, $200 dollars on the AirPods and $45 of other charges that month, your total balance is $1245. although on the installment plans you may only need to pay say $40 for the iPhone and $20 for the Airpods plus the $45, you technically only need to pay that month $105 to not accrue interest for late payments.
It pays the entire due amount. Not specific items. There is no separation of items.
If you pay more than what is due that month, then it subtracts from your total Balance. So if you pay $200 for that month, it will reduce your entire balance by $200 instead of just the $105 you must pay to avoid interest. So you would only have left to pay in total $1045. Instead of $1140.