Katie Britt, a former chief of staff to the retiring Senator Richard C. Shelby of Alabama, won the Republican nomination to replace her onetime boss on Tuesday, comfortably defeating a right-wing rival in a race that puts the 40-year-old on track to become the youngest woman in the United States Senate.The Alabama Senate primary was the marquee contest on Tuesday as a handful of states across the South held primaries or runoffs, and a House race in Texas last month that went to a recount gave a moderate Democratic incumbent a victory. The Senate race in Alabama took a number of twisting turns involving former President Donald J. Trump, who has made the 2022 primary season into a rolling referendum on his influence. Mr. Trump has carefully guarded his record in picking Republican primary winners, and his shifting allegiances in Alabama were among the best examples of his obsession with scoring wins — and avoiding losses — ahead of a 2024 presidential run that he continues to loudly tease.But in Georgia, where Mr. Trump last month suffered his most serious political setbacks of 2022, the former president continued to rack up losses, as two congressional candidates he supported lost their runoffs on Tuesday. Yet even in races where Mr. Trump’s handpicked candidates have faltered this year, those who defeated them in primaries have rarely broken with the former president. Many have run as Trump allies even without his formal support.In Alabama, Mr. Trump had initially offered his “complete and total endorsement” to Representative Mo Brooks, a congressional ally who spearheaded efforts to overturn the 2020 election and who spoke at the Jan. 6, 2021, rally near the White House that preceded the riot at the Capitol. Katie Britt speaks to supporters in Montgomery, Ala., on Tuesday.Charity Rachelle for The New York TimesBut when Mr. Brooks sank in the polls, Mr. Trump rescinded that endorsement leading up to the first round of voting in May. The former president claimed it was because Mr. Brooks had stopped fully embracing his falsehoods about the 2020 election. In the end, Mr. Trump backed Ms. Britt, who cuts a more traditional Republican profile as a former congressional staffer, lobbyist and past president of the Business Council of Alabama.Ms. Britt, who lobbied privately for the endorsement, finished far ahead in the May primary, with almost 45 percent, nearly enough to avoid a runoff. She was a heavy front-runner in polls when Mr. Trump endorsed her earlier this month.“Alabama has spoken,” Ms. Britt declared in a victory speech in Montgomery, Ala., on Tuesday evening. “We want new blood.”Ms. Britt added that she entered the race despite naysayers telling her: “You’re too young. Wait your turn.” Mr. Trump has scored a number of decisive wins in 2022 Senate primary races: Dr. Mehmet Oz in Pennsylvania, J.D. Vance in Ohio, Herschel Walker in Georgia and Representative Ted Budd in North Carolina. He has fared more poorly in governor’s races, losing in Georgia, Idaho and Nebraska. In the Pennsylvania governor’s race, like in the Alabama Senate contest, Mr. Trump made a late endorsement of a front-runner to claim a political victory.More than $41 million was spent on television advertising in the Alabama race, with about twice as much spent on ads backing Ms. Britt as Mr. Brooks, according to AdImpact, a firm that tracks ad spending.Ms. Britt ran as a Christian conservative, with the cross on her necklace clearly visible in a number of her television ads, including one she filmed at the border as she pledged to “fight to finish President Trump’s wall.”Without Mr. Trump’s backing, Mr. Brooks campaigned against Senator Mitch McConnell, the Senate Republican leader, saying Mr. Trump was “conned” by the Kentucky Republican and accusing Mr. Trump of disloyalty. He held his election-night party at an indoor shooting range in Huntsville, Ala., on Tuesday and he was not in a charitable mood.“The voters have spoken, but not spoken wisely,” Mr. Brooks said, adding of the groups that spent money for Ms. Britt, “I’m not pleased about congratulating these special interests but they rule Montgomery. They rule Washington, D.C. They rule the policy debate.”In Georgia and Virginia, voters helped determine the Republican Party’s direction in a number of key congressional contests, setting up closely watched matchups for November. And in Washington, D.C., Mayor Muriel Bowser defeated three primary opponents in her bid to become the first mayor in the nation’s capital since Marion Barry in the 1990s to win three consecutive terms.Muriel Bowser, left, the mayor of Washington, D.C., greeted Senator Chuck Schumer of New York, right, and House Speaker Nancy Pelosi during a rally against gun violence in Washington.Shuran Huang for The New York TimesIn Texas, a fierce Democratic clash in the border region of Laredo was called on Tuesday nearly a month after the May 24 runoff, as Representative Henry Cuellar, a moderate, survived a second consecutive primary challenge from Jessica Cisneros, a lawyer who was once his intern. A recount by the Texas Democratic Party found Mr. Cuellar won by 289 votes.For Mr. Trump, Georgia has proved to be his most challenging state in 2022.Gov. Brian Kemp, a Republican whom Mr. Trump had made a top target for defeat because he certified the 2020 election, won renomination in a landslide last month, easily dispatching a Trump-backed challenger. That same night, the former president saw his choices for secretary of state, insurance commissioner and attorney general in Georgia all defeated by Republican incumbents aligned with Mr. Kemp. Mr. Trump’s picks for lieutenant governor and U.S. Senate did win open races in May.But on Tuesday, two of Mr. Trump’s picks for House races lost in Georgia.In Georgia’s 10th District, Vernon Jones — a longtime Democrat who endorsed Mr. Trump in 2020, became a Republican and now calls himself a “Black Donald Trump” — lost to Mike Collins, the son of a former congressman, in a contest that became notably nasty. The Collins campaign handed out rape whistles with Mr. Jones’s name on them to draw attention to a specific 2005 allegation and a history of misconduct with women. Mr. Jones filed a police report against Mr. Collins, claiming a tweet was threatening.Mike Collins, left, and Vernon Jones spoke at a debate in Atlanta earlier this month.Brynn Anderson/Associated PressMr. Jones initially ran for governor but switched to the House race at the direction of Mr. Trump, who had endorsed him. Mr. Kemp had endorsed Mr. Collins, putting the Georgia governor again at odds with the former president.In the redrawn Sixth District, which is currently held by a Democrat but was redrawn into a Republican seat, Jake Evans, a lawyer, lost to Rich McCormick, a physician. Mr. Trump backed Mr. Evans, the son of a former ambassador appointed by Mr. Trump.Understand the 2022 Midterm ElectionsCard 1 of 6Why are these midterm races so important? More