An aquarium is a living system, not a decorated bowl of water. The filter needs time to develop bacteria that process waste. Adding fish too soon is one of the most common beginner mistakes.
The nitrogen cycle
Fish waste and uneaten food create ammonia, which is toxic. Beneficial bacteria convert ammonia into nitrite and then nitrate. Cycling the aquarium means allowing this biological filter to establish before the tank is fully stocked.
Set up first, buy fish later
Install the filter, heater if needed, substrate, plants and hardscape. Test water values and research species before buying. Fish have different needs for temperature, water hardness, group size and swimming space.
Stock slowly
Add a small number of suitable fish only when the tank is ready, then monitor water values. Overfeeding and overcrowding cause many problems. Patience in the first month prevents suffering and saves money.