Yes, cut off those flowering

Yes, cut off those flowering stalks. When lettuce forms a flowering stalk and blooms, it is called bolting. This will make the lettuce more bitter, but you can try to slow it by cutting off the stalks as soon as you see them develop. You might also be able to slow or discourage bolting by partially shading the lettuce from the heat, keeping the soil evenly moist (but not soggy), and harvesting the outer leaves at regular intervals. Bolting happens when the temperatures become warmer and daylight lengthens. As an alternative, when you see signs of bolting, harvest the entire plant before the leaves become bitter.