Zucchini blossoms rot during and after fruit develops. The rot (or bug) then enters fruit and rots same.
Zucchini Blossoms Rot, or Bug Invades Fruit
Certified GKH Gardening Expert
Depending on how large the fruit get, it is either blossom end rot or poor pollination. These articles will help: