Things are looking pretty vigorous in the garden still. I just harvested my garlic last weekend (~1500 heads). Better size than last year, but slightly more foliar disease; I may use netting next summer to keep pests off ...
To OP - I'm guessing you planted onion sets (baby bulbs). Onions are biennial - they flower on the second year. This happens often when using starter bulbs. The good news - Free seeds! you should wait until they mature and save the seeds. Next year grow from seed - they'll be bigger and won't bolt. Put like 25 to 50 seeds in a solo cup (or similar pot) next jan-February and grow them in a window until early spring. Soak them in water to break up the clump growing in your cup and plant them as individuals in your bed - add sulfur with your fertilizer to bed for pest control and better pungency. Protip: trim onion leaves 2-3 times through growing season about 8 inches tall to keep the weight off the stem and prevent early senescence ( triggered by bending of the stem) as well as triggering additional leaf production (ie more layers in yo onion)

