DianeD123, the labels on fertilizers designating them for particular plants are misleading. "For Roses" or "For Tomatoes" only means it is a good balance for those plants, but doesn't mean you can't use it on other things. You didn't post photos of your plants, so we don't know what other factors might be affecting growth—sun exposure, soil quality, watering routine, in pot or ground, etc. Whether you planted them from seeds or seedlings from the nursery, did you check the packet or label to see how big they get? Cosmos varieties range from very small to quite large.
Also, at this time of year nearly everything in the garden can use a nitrogen boost. It's the nutrient first and most likely to leech from the soil. Anything roughly balanced as described above will do.