Q.this is year 2 and my phlox did not bloom except all green
what can I do to get them to flower
You may have too much nitrogen in your soil, this could be caused by over fertilizing.
Too much nitrogen will cause lots of green leaves and no flowers. If you fertilize you should use a balanced fertilizer, like 10-10-10.
By adding phosphorous you can encourage or boost flowers. Bone Meal is a good way to do this.
You can do a soil test to determine the nutrients in you soil.
Here are some links with more information.
https://www.gardeningknowhow.com/ornamental/flowers/phlox/growing-garden-phlox.htm
https://www.gardeningknowhow.com/garden-how-to/soil-fertilizers/phosphorus-plant-growth.htm
https://www.gardeningknowhow.com/garden-how-to/soil-fertilizers/bone-meal-fertilizer.htm