Medical Deduction Timeline

Hi,

 

I had surgery in November 2022, but made the payments for it in January 2023. Will I able to deduct those expenses for the 2022 year? Or will I deduct them in 2023 because that's when I actually made the payments? Thank you.