My first publication was a case report during my MS4 year. I found an attending in my chosen field, shadowed him, and asked him if he had any interesting cases that I could write up. I wrote the case report, he edited the heck out of it for content and form, and I got first authorship.
You really need someone senior to help you select a case, because you don't have enough context as a med student to know what is worth writing up. I mean, you could see porphyria or a pheo and think it is incredible, but if it doesn't teach something new or interesting, it probably shouldn't get written up. Because they will find a porphyria expert to review that manuscript, and they might say "meh".
As a fellow, I have tried to give interesting cases to my residents to write up, and they almost never take the opportunity. Residents are overworked and case reports just don't carry that much weight to make them worth it. Attendings that are clinician-scientists rarely write cases up by themselves, but some pure clinicians or clinician-educator track people do write a lot of them. So as a med student, you should feel empowered to grab the bull by the horns and ask your attendings for help identifying cases and editing your manuscript.