After a long silence, I go back to answering some questions about the garden publicly, in this period I had little time available and I limited myself to giving quicker answers in private. I'm sorry because the public answer can be useful not only to those who asked the question, and also remains open thanks to the comments to readers who may have other experiences.
We come to us: your question is related to the fruiting of the zucchini. This garden plant forms male and female flowers, thanks to pollinating agents (blessed be the bees!) The male flower fertilizes the female flower and the fruit begins to form from the flower.
You tell me that the zucchini fruit on the one hand swells and on the other rots: in order to give you a specific answer, I should see your zucchini, and maybe have them grown together with you so you know what may have happened. From a distance I can try to answer you by listing some reasons that can cause the rotting of the zucchini in the formation phase, it is up to you to understand if among these causes there is the one that afflicts your garden.
How come the zucchini fruit rots
The first problem that a zucchini crop that is bearing fruit may have is that the fruit set process does not even begin. Self there is a lack of pollinators the female flower does not receive pollen and therefore rots on the plant. I do not think this is your case: you are talking about enlargement and this suggests that the formation of the fruit has begun. However, courgette flowers are not pollinated if there are no beneficial insects: in this case, the vegetable garden must be rethought to attract bees. To do this we can plant some flowers they like, create shelters like a hedge and be very careful not to kill them with pesticides, even natural ones such as pyrethrum. While the bees are waiting, a brush can be used to manually pollinate the flowers.
Another cause of non-fertilization is the collection of all the courgette flowers male too soon, in the article on how and when to pick courgette flowers there is a few more elements.
Once the flower is pollinated, the zucchini fruit can rot for other causes, primarily due toof fungal diseases. This type of problem is greatly favored by excessive humidity, often the result of errors by the grower.
A too compact or clayey soil, not worked thoroughly, it can create stagnant water and make plants sick. The possible diseases are various, many involve the rot of the fruit. Sick fruits generally begin to rot from the tip, which is the most exposed part, must be promptly removed and eliminated to avoid spreading the infection, together with all parts of the plant that appear abnormal. Often the disease also manifests itself on the leaves, which are dusted with white in the case of powdery mildew, or we find the symptoms in the form of gray mold in the case of botrytis, or it can be the soft rot of Erwinia carotovora. To prevent problems it is important to dig the soil well and avoid excessive irrigation. A mulch that does not allow the young zucchini to rest directly on the ground can also be useful, preserving them from too much humidity.
If the fruits rot on plants that appear very healthy and are particularly active in vegetating, we may instead have an imbalance in the presence of nutritional elements, due to an excess of fertilizer. Even one too much nitrogen fertilization in fact it can weaken the plant, making the zucchini vulnerable to disease and therefore causing rotting of the fruit. This happens in particular if you give liquid or dried fertilizers (such as manure or pelleted manure), with the wrong dosages. Organic soil improvers such as compost and mature manure have a slower release, while dry or liquid fertilizers immediately provide nitrogen, which pushes the plant to have a luxuriant vegetation to the detriment of the fruits.