Yes. You know how any onion will make a flower at the top of a stem?
Well, garlic does, too.
BUT before the flower opens, the stem will curl around (I think they are pretty).
That's when you cut of the flower bud, with the curled stem, and can use it in cooking.
Cutting off the flower before it goes to seed, like with any bulb, causes the energy to focus on the bulb instead of seeds.
I just learned of it a couple of years ago at the farmer's market when they had the "garlic scapes" for sale.