You know how pregnancy works right? If the mother dies, the baby is likely to go with her. I can't think of many situations outside a hospital in which that is not the case.Of the mother yes, but who decides the viability of the foetus/baby/human? What if they pop it out premature and it doesn't make it? Is it an innocent bystander?
Essentially the rights to an abortion through the Roe vs Wade case come through a side angle of a person's constitutional right to privacy. In order to try and balance the rights of the woman, and the rights of the potential life, they put an outset of the women having the most rights within the first trimester and these would diminish as the pregnancy continued.
Roe vs Wade makes several key rulings; a state cannot regulate abortion in the first trimester at all, that they could regulate within the second trimester, but only to protect a woman's health, and that they could outright prohibit within the third, except if the life of the mother is at risk. They also set the standard of strict scrutiny for any review of the law, which is the highest level of judicial review. It's the highest burden that exists within constitutional law.
You also have the Abortion Control Act which stipulates things like the 24hr wait period, parental consent in the case of a minor, spousal notification and mandatory disclosure. This is where Planned Parenthood vs Casey enters the fray. Now under the stare decisis doctrine of respecting precedent of previous rulings, the only thing not upheld in this dispute was the spousal notification, and they also re-worked the trimester guidelines put into play from Roe vs Wade, into ones based on viability of the fetus being the new benchmark for the increased state interest, and dimishing rights of the mother.
There were medical advances in that time period and where previously viability of the fetus was usually around 28 weeks, these days we're closer to the 24-25 weeks for viability. Because of the more open phrasing and less constrained trimester guidelines, and the 28 week underpinning of the original Roe vs Wade decision; there can now be increased state interest once a fetus reaches viability. Before viability they can have some interest in fetal health, as long as it doesn't cause an undue burden on the woman's right to seek an abortion. After viability, they can regulate and even outlaw it, except in the preservation of the mother's life. This is why the spousal notification was dropped, as this was the only part of the act considered to actually cause an undue burden on the process.
So after Casey what should be taken away is that states cannot ban abortion before 24 weeks, and any evaluation moved to an undue burden standard of judicial review, which is far more lenient than the strict scrutiny standard previously in play.
The Alabama laws don't criminalise the mothers, but takes aim at the doctors, and contains wording like "Abortion isn't a medical procedure. It's a genocide on par with crimes against humanity" (Alabama House Bill 314, 2019). This bill also sets strict rules on the type of endangerment the mother must be in to justify the abortion.
There's more to go into...but you get the idea. Go check out Georgia's new laws which actually target the mother for prosecution if anything happens after they detect cardiac activity. They also have some seriously draconian stuff, if the mother leaves the state to have an abortion she can be charged with conspiracy to murder and the like; if someone drives her, they too can get conspiracy to commit murder.
Also, sorry for the wall of text. A long way to answer the viability stuff. It's complicated, because some of these new laws have been written for the exact purpose of challenging the Supreme Court Precedent, and they outright conflict with it for the express purpose of having them pulled into Supreme Court Review. The Heart-beat viability is in direct contradiction to the 24-week standard from Casey as well as the trimester standard of Roe.