I didn't know you could get insurance in other places outside of where you lived
This is what the European Health Insurance card is good for. It is good in other countries. I had insurance in the past too, but that was valid only in my country (in Hungary). I have not had the European Health Insurance card, when I was on Tenerife. Now I have. It is good almost in the entire European continent. And of course I still have the local (Hungarian) health insurance too.
can you get insurance as a tourist too?
Yes. The European Health Insurance card is good for the tourists too. It is good for anyone, who is temporarily staying abroad in most of the European countries.
RE: I came back to Hungary because of an injury (2023.06.07)