It is very unfortunate your hypothyroidism was untreated. If it makes you feel less alone I had a similar situation during my Step 1. Undiagnosed systemic autoimmune disease that was causing me severe fatigue and brain fog. I ended up barely passing step 1 with a score of 19x.
Midway through M3 I forced my NP to run specific rheum tests she was not even familiar with... Got on plaquenil, felt a lot better.
Just got my step 2 score of 25x. I had a 50+ point improvement.
During M3 my confidence plummeted. I let myself think I was the dumbest medical student who didn't deserve to be here. I struggled to stay awake to study and struggled with medical knowledge due to fatigue/brain fog. I never honored a shelf exam. I saw on residency searchers even FM programs had step 1 cutoffs of 200 or 215 etc... As someone who is tbh not great clinically, I was so worried I would not even get FM interviews and that my medical career was doomed.
I'm an M4 now applying FM soon. I never really had my sight set on any specific specialty, but hoping I can now get into a good FM program and keep living my life. Is it my ideal specialty? maybe not but maybe with effort you can still get into other specialties. You should still try.
Life sucks sometimes and it is unfortunate when things like this happen during something as big as Step 1, but you can and should still keep going forward.
Don't let your step 1 score make you feel less worthy. My step 2 score does not make me more worthy now either, but it let me see I have more potential than I let myself believe.
Never be the one to say no to yourself. Let someone else say no to you.