when they're in veg, they need lots of nitrogen.
when you flower them, they need more potassium and phosphate.
fertilizers have N-P-K values on them that stand for percentage available nitrogen, phosphate, and potassium.
So for veg, you want High-Low-Low
For flower, you want Low-High-High