They are stressed because there's not enough barbs (they need to be in groups of a minimum of 6), the tank is too small, and the tank wasn't cycled before you put them in it.
No, do not just go buy more barbs and add them to this tank. Yes, they need to be in a larger group, but the tank is already too small and adding more of them will just overcrowd them and cause more stress.
You mentioned you bought this tank yesterday. So it has not been cycled. These fish really need a tank that has been running for a while. Newly set up tanks haven't had the time yet to establish a bacteria colony to deal with fish waste or any other excess toxins.
Are there any other fish in this tank?
Are you using a filter?
What are your readings for ammonia, nitrite, and nitrate? You will need a water test kit for this. If you do not have a test kit, the pet store will test your water for free. Get the actual numbers from the test. Your water isn't "perfect" or "fine" and you should not accept that as an answer if the pet store tests your water for you.
Are you using a heater? What temperature is the heater set to?
Did you use a water conditioner or dechlorinator at all, or are the fish swimming in raw tap water?
How long have you had these fish? You mentioned you got the tank yesterday, but when did you get the fish, and what kind of conditions were they living in before you put them in this tank? The way you phrased it sounds like you got the fish first, then got the tank.