Earthworms are hermaphrodites, each individual produces sperm and eggs, the reproductive system consists of male and female organs arranged in the ventral region between segments 9-14.
▶ It is estimated that each individual after copulation produces coconuts in variable numbers. From each cocoon, worms emerge after a period of 2 to 4 weeks. Maturity occurs between 40 - 50 days after hatching. The adult stage is characterized by the presence of the clitellum.

▶ Credits: Groworganic. – [Image of Public Domain]
Earthworm reproduction takes place throughout the year, among the main factors that influence the reproduction of capsules are those that I will mention below.
Species, density, quality of food, temperature and humidity of the medium. If the worm is periodically moved to fresh food, capsule production and fecundity increase.
Fecundity may decrease as rearing time passes, as food reserves decrease. The most favorable humidity is 80%. The optimum temperature is 20° C.
As for the classification of earthworms, we have the a) epigean, which are the earthworms that live on the surface of the soil and feed on organic matter, b) endogean, which are the best known, they live inside the soil, dig horizontal galleries and eat and defecate organic matter rich in humus, and c) anecic, which live inside the soil, dig vertical galleries and during the night they go up to the surface of the soil feeding on organic matter.
NOTE: Reference material.