The code 1 indicates penalty and the issuer had no knowledge of an exception. You need Form 5329 to get the hardship. Once you finish the 1099-R entry, search for 5329 and select medical.
Warning- only medical bills over 7.5% of your AGI will go against the penalty. If your medical bills do not exceed 7.5% of your income, then you will have a penalty.
For the medical expenses, claim every bandage, COVID test, trip to doctors, pick up prescriptions, even condoms count. Go through Publication 502, Medical and Dental Expenses finding things to claim.
I am sorry you had such a rough year and hope things are better now.