1. First of all, you are the legal holder of the credit card and have signed a contract with the card-issuing bank.
If you use your card to make purchases, and the holder holds it legally (borrowed with your consent, not stolen or otherwise illegally obtained), and the merchant has done the necessary review obligations, if the bank collects debt , the debt incurred shall be borne by you first.
2. The agreement between you and your friend is another contract.
Your behavior violates the relevant management regulations of credit cards, and you will be responsible for any resulting liability.
The agreement between you and your friend is only valid between you. You can use the written evidence as evidence to demand repayment from your friend, or sue the other party to protect your legal rights.
3. Do not lend your own credit card to others.
I hope you can avoid possible risks and protect your legitimate rights and interests.