I didn't see anyone else mention this but goldfish are SOCIAL animals and you cannot just get 1 and believe it will be happy. Goldfish need other goldfish friends, fancy fan tail or bubble eye or brain goldfish, it doesn't matter, they are social animals and need another goldfish with them
I know you realize now that a 5g tank is too small for a goldfish but I didn't see anyone else touch basis on the social factor, and if others have, I apologize for a repeat answer.
As to vet care...well....Just ten-twenty years ago the idea of taking a bird to a vet was baffling for people to understand. Since the fish community is growing and growing, you'll see more and more people in general who are baffled that someone WOULDNT take their fish to the vet. Kind of like bird people imn 2019 vs bird people in 1999. Even now, we see people say "but I bought this stupid parakeet/finch for $20, why should I take it to the vet when I can spend another $20 and just replace it?" As if the animal doesn't feel pain and suffering just because a person put a $20 price tag on them.
Most of my birds were free and I have cockatoos. I have had other parrots; amazons, cockatiels, variety of finches, lovebirds and budgies, and many were free. Just because they were cheap, doesn't mean they don't deserve adequate care (housing, food, vet care).
I personally don't like the idea of spending money on vet care for a fish, BUT that is why I do not have fish. I LOVE fish, they are beautiful. Fish tanks are BEAUTIFUL. But they are high maintenance and the idea of somehow transporting a fish - in water - to a vet, just seems like a hassle. So I do not have fish. I do not want to be a bad pet owner if I cannot or will not take proper care of them if they get sick.