Q.how do you prune wallflowers
I have got wallflowers that have long stems with just one bloom at its tip

Certified GKH Gardening Expert
Two things come to mind:
This can happen when there is not enough nutrients in the soil, or an excessive amount of nitrogen, but not enough potassium and phosphorus.
This can also happen when there isn't quite enough sun, so be sure that these receive more sun than shade, if they are in a shaded location.
This article will help you to grow these plants: https://www.gardeningknowhow.com/ornamental/flowers/wallflower/growing-wallflower-plants.htm