I have four acquaintances raising grandchildren as if they were their own.
Some charities will pay a woman’s medical costs if covering such expenses will help her decide to carry the baby to term.
From a libertarian perspective, individuals or charities paying a woman beyond her medical expenses should also be a viable solution. Remuneration would be for the woman’s time and physical effort (labor), not a “purchase price” for the child. The arrangement could stipulate, as surrogate motherhood contracts usually do, that payment is contingent on her putting the child up for adoption.