The law bans abortion (with some exceptions) after 20 weeks, which is earlier than any law that has withstood judicial review. The “pain” thing is the gimmick used to convince courts that the state has a compelling state interest that outweighs “the woman’s right to privacy” that Harry Blackmun pulled out of his [donkey] in 1973.
This “gimmick” is shifting the law and the debate completely away from the core principles which are the only true basis of the rule of law in this country.