Zucchini Fruit Rots
The fruit grows about 1 to 2 inches then rots. The plant looks healthy.
Certified GKH Gardening Expert
It sounds like a pollination problem. These articles will help:
You could also be having a problem with blossom end rot. This article will help if you are seeing any of this as well: https://www.gardeningknowhow.com/edible/vegetables/squash/squash-blossom-end-rot-causes-and-treatment.htm