My zucchini fruit get to about 3 inches long and yellows and falls off the plant. The plant looks relatively healthy other than this. There were numerous fruit but it has happened to every one. The plant is in a raised garden bed with bought soil.
My Zucchini Fruit Falls Off
Certified GKH Gardening Expert
It sounds like you either have a pollination problem or blossom end rot. These articles can help you learn more about both and decide which it might be: https://www.gardeningknowhow.com/edible/vegetables/zucchini/zucchini-fruit-fall-off-the-plant-before-they-are-full-grown.htm