The best way to prevent abortion is to prevent unwanted pregnancies. Making contraception and good information about contraception available seems to be the most effective way. And that includes sex education in schools.
If you are going to have abortions at all, earlier abortions are better than later abortions. Legal abortion without stigma helps here. As a general rule, the harder it is to obtain an abortion the greater the average delay.
A complete ban on abortion has obvious problems. Are you going to make a woman give birth to her rapist’s child ? Continue with a pregnancy that is likely to kill her ? Carry a foetus with no chance of survival outside the womb ?
Consider the case of
Savita Halappanavar. Even though she was miscarrying at 17 weeks the doctors refused to terminate the pregnancy. They also missed the sepsis that killed her - a known risk. Had they terminated the pregnancy she would very likely be alive today.