Since it would be in a law, lawmakers and lawyers, of course. Just like any other law. Professional medical opinions from multiple sources on both sides of the issue should be listened to.
The vast majority of medical doctors agree that elective abortion should be legal until viability, but they widely set the standard self-imposed limit at 22 weeks, sometimes 20 weeks. (There's no cut-off point in Canadian law, but in practice, the self-imposed limit is the same).
Everywhere developed nations' laws have an earlier cut-off point, they make it easy to access early abortion and usually have exceptions for later not just to save the woman's life/major health functions, and for rape/ incest, but also in the case of seriously malformed fetuses.
With the exception of Sweden and Japan, these laws emerged partly in tandem with the US after the Sherry Finkbine case - seriously malformed fetus. The medical profession was quite supportive of the abortion law reform and repeal movement of the US in the 1960s, as were many Protestant churches. Though churches/ religions had varied perspectives, only the Catholic church was extremely anti-choice, until about 1978. The medical profession has never varied: most medical professionals supported and some did not.
All of what you see now is predictable history. It has nothing to do with "new discoveries" in biology.
In 1973, Roe v Wade was not a hugely controversial decision. It was a complex, conservative compromise decision by six Republican justices and one Democrat, with one Republican and one Democrat dissenting. The Republican Party was still the educated party then and full of professionals in medicine, law, etc. But it was beginning to lose them.
In the 1960s, the Civil Rights Act and Voting Rights Act were passed under Democratic administrations, and the Dems alienated Southern white Democrats. Hence, in the late 1960s, Nixon got the vote of those people, who increasingly joined the Republican Party.
In 1978, though, the GOP didn't think that would be enough for it to get back the presidency because of Nixon's still-remembered Watergate scandal. Someone in the Republican National Committee (I forget who) wanted to use opposition to abortion to draw the blue-collar Catholic vote. The GOP cut a deal with not very large right-wing Christian organizations: we put an anti-choice plank in the party platform and you deliver the votes. After that, those organizations "owned" the Republicans.
In 1992, pro-choice Republicans were horrified by their party on this issue, and pro-choice Republican Ross Perot ran for president on an independent ticket, splitting the GOP vote, so Bill Clinton won.
It is possible to follow all the years since in this way, showing how the GOP gradually lost educated persons and gained uneducated ones. That is how Trump won but the Democrats finally overcame him with Biden.
The idea that the medical professionals are about 50/50 on the abortion issue is mistaken. Only a small minority are anti-choice, and many of them are Catholics.
Texas has always been anti-abortion, and other Southern ex-slave states. But after 1978, it was essentially a way for Republican politicians to win. Many only care about "life" because they want political power.