You should do a water change 24 hours before getting or adding new fish to a tank so you don't stress them more than they already are.
If you have just added new fish, wait 1 week before doing a water change to minimise the stress they are put under.
The stress comes from the fish being sent to the shop. Put in their tanks, which might have different water chemistry to the supplier. Chased around the tank when people try to catch them or other fish in the tank. Put into a plastic bag and transported to your house. Put into your tank, which might have different water chemistry again.
All these stress factors affect the fish, so either do a water change before getting new fish or wait a week so they can recover a bit before doing a water change.
The only exception to this is if you get an ammonia or nitrite problem. Then you do a water change any day you have a reading above 0ppm.