Gospel Principles manual describes the Law of Chastity and Abortion.
Gospel Principles, The Church of Jesus Christ of Latter-day Saints, Chapter 39, accessed December 2, 2021
We are to have sexual relations only with our spouse to whom we are legally married. No one, male or female, is to have sexual relations before marriage. After marriage, sexual relations are permitted only with our spouse.
. . .
If a man and a woman break the law of chastity and conceive a child, they may be tempted to commit another abominable sin: abortion. There is seldom any justifiable reason for abortion. Church leaders have said that some exceptional circumstances may justify an abortion, such as when pregnancy is the result of incest or rape, when the life or health of the mother is judged by competent medical authority to be in serious jeopardy, or when the fetus is known by competent medical authority to have severe defects that will not allow the baby to survive beyond birth. But even these circumstances do not automatically justify an abortion. Those who face such circumstances should consider abortion only after consulting with their local Church leaders and receiving a confirmation through earnest prayer.