Dear student,
A gynoecium is a collective term for the parts of a flower that produce ovules and ultimately develop into the fruit and seeds.
The gynoecium may have one or more pistils. Carpels are the basic building blocks of a pistil. A pistil may have one carpel or more than one fused carpels.
Carpels and pistils have three parts: stigma, style, and ovary.
Regards.