As all the student apartments were only rented for the duration of one whole semester I was not able to get student accommodation. Fortunately, I received a lot of useful links for apartment hunting from the secretary of the lab I was conducting my thesis at.
Gästezimmer-Zentrale Heidelberg – a private intermediary agency
https://www.gaestezimmerzentrale.biz/g%C3%A4stezimmer-zentrale-english/
I found the place where I lived through this agency. The process of getting an apartment was very quick and easy. I ended up sharing an apartment with an elderly German woman. I had my own room, but I shared the kitchen and bathroom. I did not find this type of accommodation ideal as I was seen more as a guest rather than a tenant. Unfortunately, my landlady and I had very different personalities and did not get along the best way. Also, my landlady had a lot of rather odd rules. For instance, I was not allowed to invite any of my friends there. On the good side, the apartment was only 5 minutes away by bike from the Neuenheim campus of the university where my lab was located.
Guesthouse of the University of Heidelberg. The rents are notably higher compared to other options.
https://www.uni-heidelberg.de/institutions/guesthouses/index.html
Sites for finding a VG (shared apartments, popular amongst students). I would recommend this option since you would have a good chance of making friends with your flatmates.
https://www.wg-gesucht.de/wg-zimmer-in-Heidelberg.59.0.1.0.html
https://www.immobilienscout24.de/Suche/de/baden-wuerttemberg/heidelberg/wg-zimmer
The living standards in Germany are very similar compared to Sweden. When it comes to the rents, they are generally lower than in Stockholm. I paid 450 € per month (including everything) which was on the more expensive site.