Democrats won decisive victories in major races across the country on Tuesday evening, overcoming the downward pull of an unpopular president, lingering inflation and growing global unrest by relying on abortion, the issue that has emerged as their fail-safe since the Supreme Court overturned Roe v. Wade last year.

In races in parts of the South and the Rust Belt, Democrats put abortion rights at the center of their campaigns, spending tens of millions of dollars on ads highlighting Republican support for abortion bans.

The Democratic governor of Kentucky, Andy Beshear, won a second term, after repeatedly criticizing his Republican opponent for initially backing a state abortion ban that contains no exceptions for rape or incest. In Virginia, Democrats won control of both chambers after an avalanche of advertising focused on abortion. In Pennsylvania, Democrats won a seat on the State Supreme Court, in a race that also saw a flurry of abortion-related ads.

And in Ohio, a ballot measure establishing a right to abortion in the State Constitution won by a double-digit margin, a striking demonstration of support for abortion rights in a conservative state that Donald J. Trump won twice by convincing margins.

The results amounted to a resounding victory for abortion rights, proving once again that the issue can energize a broad coalition of Democrats, independents and even some moderate Republicans. As the country heads into the 2024 presidential election, the Republican Party continues to search for an answer to a topic that has vexed them since the fall of Roe. Democrats, meanwhile, face a daunting question of their own, in a year when President Biden’s record, personal brand and perceptions of his fitness to serve another term will be inescapable.

Will abortion still pack enough of an electoral punch to overcome Mr. Biden’s political weaknesses?

Historically, re-elections have been referendums on the incumbent president and his leadership. Democrats are hoping to transform the 2024 contest into something different — an election that revolves not around the present occupant of the White House but around the previous one, Mr. Trump, and his party’s embrace of abortion bans that are out of step with a majority of voters.

Already, Democrats have launched plans to use referendums, like the one that passed in Ohio, as a way to energize their base in 2024. There are efforts underway to get such measures on the ballot in swing states including Arizona, Florida, Nevada and Pennsylvania. For his part, Mr. Biden’s campaign released an early ad highlighting Mr. Trump’s support for overturning Roe.

“Abortion is the No. 1 issue in the 2024 campaign,” Gov. J.B. Pritzker of Illinois, a Democrat who gave money to support both the Ohio ballot measure and the Virginia legislative contests, said in an interview on Tuesday. “If you’re not talking about protecting women’s reproductive rights as a Democrat, you’re not doing it right.”

It remains unclear if Democrats will be successful next year in their push to focus on abortion rights. The 2024 race will be the first post-Roe presidential election, plunging both parties into uncharted political terrain. The political impact of abortion may be blunted by the all-consuming national conversation of a presidential contest paired with Mr. Trump’s criminal indictments and courtroom drama.

Democrats didn’t accomplish a total sweep of the races on Tuesday. In Mississippi, the Republican governor, Tate Reeves, won re-election, defeating Brandon Presley, a self-proclaimed “pro-life” Democrat.

Still, the Biden campaign felt validated by the results, in particular in Kentucky, where it had tracked millions of dollars in anti-Biden television ads. At the White House, Mr. Biden was making congratulatory calls to the evening’s winners, including Mr. Beshear and candidates in Virginia, according to two people familiar with the matter.

In his race, Mr. Beshear went to great pains to separate himself from the president, rarely — if ever — using Mr. Biden’s name. Mr. Beshear is one of the most popular governors in the country, while Mr. Biden remains politically toxic in a state that he lost by about 26 percentage points in 2020.

The Democratic victories on Tuesday marked the conclusion of a surprisingly positive off-year election cycle for the party, with many of their candidates boosted to victory by embracing the power of abortion rights as an issue. They exceeded Mr. Biden’s performance in the 2020 presidential election in 21 of 27 races this year, not counting Tuesday, according to a study conducted by the Democratic Legislative Campaign Committee, the party’s campaign arm for state legislative races. In April, Democrats flipped majority control of the Wisconsin Supreme Court from conservatives, as their liberal candidate won an 11-point triumph.

Democrats argued that the results on Tuesday night showed abortion’s resonance even in some of the country’s most conservative areas. In Kentucky, Mr. Beshear spent nearly $2 million on startling ads featuring Hadley Duvall, a young woman who said she was raped by her stepfather at the age of 12. Ms. Duvall was one of the first people Mr. Beshear thanked in his victory speech on Tuesday evening.

In Ohio, a state that Mr. Trump won by eight points in 2020, abortion-rights organizations raised three times as much in donations as their anti-abortion opponents to defeat an effort that was championed by the highest ranks of the state’s Republican Party. Support for the measure enshrining abortion rights was notably higher than the backing for the Democratic candidate for Senate last year, particularly in the suburban swing counties surrounding Columbus and Cleveland. The results will almost certainly require the State Supreme Court to invalidate a six-week ban with limited exceptions that passed in 2019.

Republicans have been searching in vain for a successful message on abortion ever since the Supreme Court’s decision.

For nearly a half-century, Republican candidates had simply proclaimed themselves “pro-life,” without delving into the details of what that meant. But the overturning of Roe plunged the party into a messy debate over unpopular questions around rape, miscarriages and terminal fetal diagnoses. An effort to introduce a 15-week federal ban in the Senate backfired on the party in the midterm elections, quickly becoming a cudgel for Democrats in key races.

Virginia offered a fresh test as Gov. Glenn Youngkin, a Republican, had proactively sought to define his party’s position as a “common-sense” 15-week ban — with exceptions in instances of rape and incest — and instead cast the Democrats as extreme. Republicans in the state attempted to shift the language of the debate, recasting what has been commonly referred to as a ban as a “reasonable 15-week limit.” But his party fell short of taking power in the State Senate and lost control of the House of Delegates.

“The 15-week thing doesn’t work because voters don’t want an abortion ban,” said Heather Williams, the interim president of the Democratic Legislative Campaign Committee, which invested heavily in Virginia. “You can’t change that language now.”

Even some Republicans acknowledged that their party had failed to articulate a message that could dampen the impact of Democratic attacks on abortion.

Vivek Ramaswamy, the Republican presidential candidate who lives in the suburbs of Columbus and who voted against the Ohio measure, said the referendum was a “lost battle.”

“Our pro-life movement, and I am part of it, needs to be better about the way we discuss this issue,” Mr. Ramaswamy said on CNN on Tuesday evening. “There are deep reflections in the Republican Party and in the pro-life movement about how to improve from here.”

Democratic leaders and candidates face steep hurdles to fulfill their campaign promises. Mr. Biden has promised to restore federal abortion rights by codifying Roe. Passing such legislation would require winning 60 votes in the Senate or ending the filibuster, both of which currently seem unlikely. Mr. Beshear in Kentucky now faces a Republican supermajority in the statehouse, which will limit his power to legalize abortion in a state with a near-total ban.

Mr. Biden — a practicing Catholic whose position on abortion has evolved along with his party — has often seemed to personally shy away from directly discussing abortion rights. He has dispatched Vice President Kamala Harris to be the administration’s leading voice on abortion, focusing his attention on foreign policy and the economy. A Biden campaign statement about the elections on Tuesday did not use the word abortion, casting the issue instead as one of “personal freedoms.”

For his part, Mr. Trump has blamed his party’s 2022 losses on abortion and staked out an intentionally ambiguous position, refusing so far to be pinned down on any week-specific limit.

Overall, Mr. Biden and Democrats fare better on the issue of abortion rights than their Republican opponents. A larger number of registered voters said they trust Mr. Biden to do a better job on abortion rights than Mr. Trump, recent polling by The New York Times and Siena College found. Yet, the survey also indicated that some voters who are supportive of abortion rights would consider casting ballots for Mr. Trump. Among voters who said they want abortion to be “mostly legal,” Mr. Trump is nearly tied, and a third of those people said they trust Mr. Trump more than Mr. Biden on abortion.

Democratic strategists say they have plenty of material to hurt Mr. Trump on the abortion issue. Not only did he appoint the three Supreme Court justices who provided the critical votes to overturn Roe, he has a history of making inflammatory comments on the issue.

“These races end this claim that these red states are all in on Trump — that there’s no nuance,” said Pat Dennis, the president of American Bridge, the Democratic Party’s clearinghouse for opposition research. “Trump has extraordinary weakness here.”