As you watch a plant grow, it would start from just a stem and growing leaves as it gets older. It doesn’t know what flower it will be all at once, but all the information for the plant is in the seed, so the plant will always know what to do, but only one leaf at a time.