Though 2023 is an off year for American politics, largely dominated by the emerging Republican presidential primary race and a series of scandals and controversies, there are still critical elections this year, offering an early window into the mood of voters in both parties before 2024.

In Kentucky, a divisive Republican primary for governor will come to a close on Tuesday. Two pillars of the state’s Republican apparatus have escalated attacks on each other as they seek to challenge Gov. Andy Beshear, a rare Democratic leader of a red state who also happens to be one of the most popular governors in the country.

In Philadelphia, the nation’s sixth most populous city and a liberal stronghold in purple Pennsylvania, voters will pick the Democratic nominee for mayor, who is all but certain to become the city’s next leader and has the potential to become a high-profile player in next year’s presidential election. And two special elections in the state could determine control of the Pennsylvania House of Representatives, where Democrats have a slim majority.

And in Delaware County, one of the suburban “collar counties” outside Philadelphia, a surprisingly close special election for an open State House seat in a once reliably Democratic district will determine who controls the Pennsylvania legislature.

There is also a notable mayoral contest unfolding in Jacksonville, Fla., the most populous American city to have a Republican mayor. The candidates to succeed Mayor Lenny Curry are Donna Deegan, a Democrat who has the support of abortion rights groups, and Daniel Davis, a Republican who has emphasized his party’s messages on crime and policing.

First test of a rising star: Daniel Cameron was already a trailblazer as the first Black man elected attorney general in Kentucky and the first Republican elected to the post in nearly 50 years. But his political celebrity skyrocketed after he delivered a prime-time speech at the 2020 Republican National Convention.

Mr. Cameron is a close ally of Senator Mitch McConnell’s; some in the state call him Mr. McConnell’s protégé. The Republican nomination for governor appeared to be his to lose after he announced his candidacy a year ago.

But what was once a double-digit lead over the rest of the field dwindled significantly during the spring as Kelly Craft, a former ambassador to the United Nations and part of a Republican megadonor family, poured millions of her own money into an aggressive ad campaign, attacking Mr. Cameron and heightening her own name identification. Though she has not completely closed the gap in polling, Republican operatives in the state have deemed it a race that is suddenly too close to call.

Less a fracture than a freeze: The heated primary in Kentucky hasn’t fractured the party like similarly contentious primaries last year, mostly because the top candidates belong to the conservative wing of the party yet do not embrace its more fringe issues, like voting machine conspiracy theories.

And of course, money plays a role. Though no Republican in the state is eager to dampen Mr. Cameron’s trajectory, they also don’t want to be on the wrong side of the Crafts, who are some of the most prolific donors in Republican politics.

The friendly wild card: Attention in the race has largely focused on Mr. Cameron and Ms. Craft. But there is a third candidate with a viable path to victory: Ryan Quarles, the agricultural commissioner and a longtime fixture in Frankfort.

Rather than splashy ads or television appearances, Mr. Quarles’s campaign has instead focused heavily on local endorsements, earning the backing of more than 230 mayors, magistrates and county officials. Those endorsements, coupled with significant support from the farming community, could give Mr. Quarles enough of a base to win an election in which support is splintered among all three.

What scandals? Even as he faces mounting legal challenges and an unfavorable verdict in the civil case in which he was successfully sued by E. Jean Carroll, former President Donald J. Trump remains the most popular and influential figure in a Republican primary election, especially in a state like Kentucky, which he carried by more than 25 points in 2020.

When asked during a debate about a jury’s finding Mr. Trump liable for sexually abusing and defaming Ms. Carroll, Mr. Cameron reiterated that he was “honored” to still have the support of the former president.

No, he endorsed me. Both candidates can claim the affection of the former president. Ms. Craft served in his administration, has donated to his campaigns and was joined by Mr. Trump at the Kentucky Derby in 2022. She has run several ads comparing her style to Mr. Trump’s.

But Mr. Trump endorsed Mr. Cameron (granted, that was before Ms. Craft had officially entered the race), a fact Mr. Cameron mentions several times in his stump speeches and ads.

“Despite what some others might tell you,” Mr. Cameron told a crowd at a Republican dinner in Meade County last month, “President Donald J. Trump has endorsed this campaign for governor.”

2017 redux? Gov. Glenn Youngkin, a Republican in light-blue Virginia, built his surprise victory in 2017 through a relentless focus on education. He portrayed Democrats as intent on introducing inappropriate material to young students and argued that a school’s curriculum was something parents, and not teachers, should decide.

Both Mr. Cameron and Ms. Craft have made education reform the bedrock of their campaign speeches. Mr. Cameron said that it was the No. 1 issue he had heard about from voters, and he has pledged to fire the Democratic-appointed commissioner of the education department. Ms. Craft, during her stump speeches, holds up copies of books she would ban.

“Woke” wars: Both candidates repeatedly blast “woke” ideology in their pitches. For months, visitors to Ms. Craft’s website were greeted with a video denouncing “woke” policies.

This loosely defined conservative catchall — a term frequently used by Gov. Ron DeSantis of Florida as well — has certainly taken root in the Republican base. It is often the biggest applause line for both Ms. Craft and Mr. Cameron.

But beyond the primary, it remains to be seen how voters in a general election will respond to an explicitly anti-“woke” campaign, even in deeply red Kentucky.

A test of left-wing strength: In the crowded Democratic mayoral contest, the former City Council member Helen Gym has emerged as the most prominent progressive candidate, bolstered by national left-wing leaders including Senator Bernie Sanders of Vermont and Representative Alexandria Ocasio-Cortez of New York.

Both of them rallied with her on Sunday, and Brandon Johnson, who won the Chicago mayor’s race last month, has endorsed her and raised funds for her.

A win for Ms. Gym, a veteran community organizer who is especially focused on schools, would be celebrated by national progressive leaders as the latest in a stretch of left-leaning victories in major cities, though their success at the national level in recent years has been far more mixed.

But whatever the outcome, many political observers in Pennsylvania caution against drawing sweeping conclusions about the mood of the city from a race that may have low turnout or could be decided by a narrow margin — or both. Sparse polling has suggested a tight and unpredictable contest.

Public safety debates dominate: Like many major American cities, Philadelphia has struggled with gun violence and other crime in the wake of the pandemic. The full picture of safety in the city is complex, but there is no question that it has been the defining issue in the mayor’s race.

The Democrats running for mayor have differed on issues like police stops of citizens — and in particular, the use of stop-and-frisk — and whether to emphasize adding more police officers to the force.

But across the ideological spectrum, they have stressed their commitment to making the city safer, and there is broad agreement on the need to both fill police vacancies and denounce police abuse.

Concerns for Democrats: Democrats have a single-vote majority in the Pennsylvania House of Representatives, but there are two special elections on Tuesday that could flip control back to Republicans.

One empty seat is in the 108th Legislative District in north-central Pennsylvania, where voters will most likely elect a Republican.

The race for the 163rd Legislative District in southeast Delaware County should be a layup for Democrats. It was vacated by former State Representative Mike Zabel, who resigned in March after being accused of harassment. But Mr. Zabel won his district by roughly 30 points in November, and the seat is in a reliably Democratic area.

Yet there are growing concerns that the seat may not be as safe as it has seemed, and Democrats across the state are mobilizing voters in the area to turn out to the polls. Gov. Josh Shapiro, a Democrat, recently made a 30-second video highlighting the race.

Abortion rights: Democrats are framing the race as critical to protecting abortion rights in Pennsylvania, where abortion is still legal. If Republicans take control of the House, they could, along with the Republican-controlled Senate, put a potential abortion ban on the ballot as a constitutional amendment.

But such bans largely failed in 2022, and were often a galvanizing force for Democratic candidates or causes — most notably in deep-red Kansas, where voters rejected an abortion ban months before the 2022 midterms.

Reid J. Epstein contributed reporting.