Deductions & credits

It is entered on the tax return in the year paid.  So you will enter the medical expenses on your 2023 tax return if paid in 2023.