There are some variations but a common saying is nitrogen for leaves, phosphorus for roots and flowers and potassium for stems, and yes it is an oversimplification and often misleading. Modern recommendations are to stick more with lower phosphorous fertilizers (something like a ratio of 3-1-2) unless you know for sure that your soil is deficient in P because many/most garden soils are adequate or already have too much. Much better to get a soil analysis and fertilize accordingly.