It is a Catholic dogma (De Fide) that
human souls are immediately created by God.
In this answer, the issue arose about what exactly "immediately" means. I'm not sure a satisfactory answer was given, so I think a post dedicated to it might be helpful.
The Catechism, in point 366 states:
The Church teaches that every spiritual soul is created immediately by God - it is not "produced" by the parents ...
The quote below, from an article by Father John A. Hardon, S.J (taken from the referred answer) might be useful, as it might indicate what "immediately" is not supposed to mean:
The Vatican Council defined against the pantheists that, “If anyone says that finite things, both corporeal and spiritual, or at least spiritual, emanated from the divine substance...Let him be anathemas DB 1801. Thus it is defined that however the soul originates, it is not by way of emanation from the deity.
Benedict XII in 1341 condemned the errors of certain Orientals, on the occasion of prospects for reuniting the schismatic Armenians with Rome. "A certain teacher,” wrote the pope, "again introduced the teaching that the human soul of a son is propagated from the soul of his father, as his body is from the body of his father. He taught also that angels are propagated one from another. He gave as his reason for this that, since a rational existing human soul, and an angel existing in an intellectual nature are a kind of spiritual light, they propagate other spiritual lights from themselves" DB 533. The Armenian who held this doctrine was named Mechitriz, which means “paraclete." By condemning Mechitriz, Benedict XI condemned generationism, even of a spiritual kind, since the erroneous teaching referred to both human souls and the angels.
Still, it is not clear what exactly immediately is supposed to mean. Has this term been defined elsewhere, perhaps? Is there a definitive teaching on this?