I'm going to offer some data here that I hope will help you to understand what
@OliveFish05 is referring to when she said they need a group. And first before that, welcome to TFF.
All tetras are what we term shoaling (sometimes schooling) fish. They live in groups numbering usually hundreds. Many other types of fish we keep in aquaria are the same--rasboras, danios, barbs, loaches, cory catfish, rainbowfishes, and probably some I can't remember. What must be understood is that this "expectation" of living in a group is part of the genetic make-up of the individual species. The individual fish within such a species will be stressed without the security a largish group provides. Some species have other issues connected with group, but one common to all such fish is the security the group provides.
Obviously we cannot usually if ever provide a group of hundreds of the species, but we can ensure there are enough of them to avoid significant stress. Stress is the reason for 90% of the diseases aquarium fish contract; in other words, if we avoid stress, we are avoiding 90% of possible disease issues. Ich or white spot for instance is only going to occur if the fish are seriously stressed; even if the parasite is present, non-stressed fish will in the majority of cases be able to manage and not become infected. So these factors, like numbers, become a very important aspect of maintaining healthy fish.
It is impossible for any of us, no matter who, to really be certain that the fish in our tank is healthy or "happy," if that is something fish feel [I'm of two minds on this "happy"], unless we ensure we have provided the best environment for the fish. And a major factor in this concerns the numbers.
A study in 2009 (going from memory) looked into this specific issue--how the number of fish of a shoaling species in an aquarium might affect the fish. The results were interesting and very clear. The lower the number of fish of the species, the more aggressive the individual fish tended to become. The species were kept in groups of three, five and ten (in separate tanks obviously), and without exception the least stressed, more peaceful, and healthier fish were those in the groups of ten. Aside from aggression, the study found that the number in the group had a direct impact on the fish's shoaling behaviour, upon "darting" from various things, and even a greater latency to feed. The fish were without any question in considerably better condition the more of them there were in the tank.
I don't know the species of tetra here, but a 5g tank is too small for all of them, with the possible exception of the Ember Tetra, but I would consider even for this nano species a 10g tank minimum.
Don't hesitate to ask any questions on this, I would be glad to explain anything that is not clear.