Genearlly nuns would enter to convent before puberty while boys would enter the monastary after. You are right that they were not orphanages and did not take young children, thou what orphanages there were, were run by the Church. Abandoing newborns to a orphanage was not possible. Babies can't survive on cow's milk, especially the unpastuzed kind.
AFAIK, babies can survive on goat milk (barely). I think I read that this was used in the past when the mother died and there was no wet nurse available.
Wet nurses were also an option. Presumably not from the monastery, but from a nearby village.