The ballot order for the June 22 New York mayoral primary was decided by lottery, not alphabetical order, but Andrew Yang will still appear last.Much of the focus in the New York City mayoral race has been given to the eight best-known Democratic candidates, who lead in fund-raising and in early polling. But on the June 22 primary ballot, none of the eight will appear at the top; that honor will go to a more obscure candidate.For Republican voters, the ballot will be far less involved: There will only be two candidates, after a third dropped out of the race last week.The contest, after months of being largely conducted virtually through online forums and fund-raisers, has shifted to a more normal pace, with candidates hitting the campaign trail in earnest last week. But they can’t put away their laptops just yet — they would risk missing the next big televised debate in May.Here’s what you need to know about the race:12 Democrats will appear on the ballot. Who is first?In a crowded field, being at the top of the ballot could arguably be an advantage, and with a dozen Democrats in the mayor’s race, it is almost certainly better to be first than last.That theory may be tested this year: Aaron Foldenauer, one of the least-known Democrats running for mayor, won top billing in the Board of Elections lottery last week.A lawyer who ran unsuccessfully for City Council in Lower Manhattan in 2017, Mr. Foldenauer celebrated the news, tweaking Andrew Yang, who got the last spot.“I’m first on the ballot for mayor, Andrew Yang, and I had to look quite far down the list to find your name!” he said on Twitter.Mr. Yang, considered the current front-runner in the race, responded to his bad fortune with a smiley face: “This feels like grade school where I was always last alphabetically.”Here is the full lineup for Democrats, from top to bottom: Mr. Foldenauer; Dianne Morales, a former nonprofit executive; Scott M. Stringer, the city comptroller; Raymond J. McGuire, a former Wall Street executive; Maya Wiley, the former counsel to Mayor Bill de Blasio; Paperboy Prince, a rapper; Art Chang, a former executive at JPMorgan Chase; Kathryn Garcia, the city’s former sanitation commissioner; Eric Adams, the Brooklyn borough president; Isaac Wright Jr., a lawyer who was wrongfully convicted on drug charges; Shaun Donovan, the former federal housing secretary; and Mr. Yang.On the Republican side, there are just two names: Curtis Sliwa, the founder of the Guardian Angels, who is listed first, and Fernando Mateo, a restaurant operator who has led or founded Hispanics Across America, the state Federation of Taxi Drivers and United Bodegas of America.The only female Republican candidate exits the race.Sara Tirschwell dropped out of the Republican mayoral race after failing to get a sufficient number of petition signatures.Kholood Eid for The New York TimesSara Tirschwell, a former Wall Street executive and the only female candidate in the Republican field, ended her campaign last week after failing to gather enough signatures to make the ballot.“The common wisdom is that the Democratic primary is the de facto election, and that is going to turn out to be true without me in the race,” she said in an interview. “I truly believe that I was the only chance the Republican Party had in the general election.”She said that Mr. Yang, Mr. Adams or Ms. Wiley would be likely to win the Democratic primary and become the next mayor. And she offered to put her “financial acumen” to use for any of them.“I would serve in anybody’s administration — Republican or Democrat — except for Fernando Mateo,” she said, blaming one of Mr. Mateo’s allies for challenging her petitions during a pandemic.Her biggest lesson from the campaign? New Yorkers, she said, want city government to “get back to the basics — picking up the trash and filling potholes.”Ms. Tirschwell said she planned to vote for Mr. Sliwa, who had defended her and had said Mr. Mateo “should call off his henchmen and stop intimidating” her.The first major debate will not be in person.Maya Wiley called for three debates to be held in person.Gabriela Bhaskar for The New York TimesAs the mayor’s race grows increasingly contentious, a number of the campaigns found agreement around one idea last week: A series of official debates should be held in person.“This election will decide what kind of city we want to be and doing the debates on just another Zoom is not going to cut it,” Ms. Wiley wrote on Twitter as she called for the three primary debates affiliated with the city’s Campaign Finance Board to be held in person. “When I am mayor, I won’t be in a box on a screen, I will be out with New Yorkers and our debates should be the same.”Nearly instantly, many of the leading candidates and campaigns agreed. Many hope to engage with each other directly — and in person — in the homestretch of the race and see the upcoming debates as one of the few opportunities for breakout moments in the contest.But as of now, the first debate, scheduled for next month, is not expected to be held in person, a spokesman for the Campaign Finance Board said.“With the first debate on May 13 less than a month away, and more than 2,000 Covid-19 cases reported daily in New York City, an in-person debate is not possible at this time,” said Matt Sollars, a spokesman for the board.He added: “The board and our co-sponsors share the view that the best debates are in-person debates” and left that possibility open for future debates.“We have a history of holding debates in front of large, live audiences,” he said. “We are confident that the 2021 mayoral debates will match or exceed the quality of those events and allow city voters to learn about and compare the candidates.”Will Stringer’s big endorsement translate into votes?The Working Families Party endorsed Scott Stringer as its first choice.Benjamin Norman for The New York TimesLeft-wing activists and leaders are growing increasingly worried as they contemplate the staying power of Mr. Yang, the former presidential candidate who embraces some progressive positions but is undoubtedly one of the more moderate contenders in the mayoral field.One major open question, though, is whether left-wing voters can coalesce around a candidate or slate of candidates to stop Mr. Yang’s momentum.The Working Families Party last week moved toward trying to facilitate a unified progressive front by issuing a ranked-choice endorsement: Mr. Stringer was endorsed as the party’s first choice, followed by Ms. Morales, the most left-wing candidate in the race, and Ms. Wiley.After months of struggling to break through the crowded mayoral field — and often being drowned out by Mr. Yang — Mr. Stringer received a dose of energy from the endorsement. But he already had the backing of many prominent progressives. His task is to turn those endorsements into enthusiasm on the ground.Some Democrats hope that if left-wing voters list the three Working Families-backed candidates first on their ballot, in any order, then one could come out on top under ranked-choice voting.That’s what Chas Stewart, a 30-year-old teacher, plans to do. He favors Ms. Morales first, then Mr. Stringer and Ms. Wiley.“It appears that her politics align most closely with mine,” he said of Ms. Morales, “especially regarding reining in the N.Y.P.D., and what else is the point of ranked-choice voting if I can’t rank that person No. 1?”Viral Yang video creates opening for opponentsMs. Wiley called Andrew Yang’s behavior “unacceptable.” Mr. Stringer released a statement from several women calling Mr. Yang’s behavior “disqualifying for someone who is seeking to be mayor of New York.”What led to their denunciations?In an encounter outside a comedy club captured on video and then broadcast on Twitter and TikTok, a comic, Lawrence Reese, asked Mr. Yang if a man could keep his Timberland boots on while having sex with women, using a coarse word for sex and a derogatory word for women.Mr. Yang patted Mr. Reese’s shoulder and suggested that “if your partner is cool with it,” that was fine. Then Mr. Reese asked if Mr. Yang choked women, again using the derogatory word for women. Mr. Yang laughed — too uproariously, his critics say — indicated that the conversation was over and walked away.Mr. Yang’s reaction — that laugh — created an immediate opening for his opponents, who have been eager to highlight his every gaffe as they look for ways to gain traction in the race.Ms. Wiley held a news conference condemning his behavior that featured the local president of the National Organization for Women, and Mr. Stringer’s allies tied Mr. Yang’s response to the allegations of “bro” culture that trailed his presidential campaign.Mr. Reese, who said he has no horse in this year’s mayoral race, suggested that Mr. Yang’s critics were just playing politics.“His opponents are going to go against him in any way they can,” he said.The 25-year-old comedian said he was merely performing one of his regular bits, where he asks people on the street random questions about their lives. In his own remarks, Mr. Yang suggested that his laugh expressed how shocked he was, and that he shut the discussion down as quickly as he could. He noted that his wife was the victim of sexual abuse.But that was not enough for some critics.Mr. Yang “should have been straight-faced and unequivocal in his reproach,” Charlotte Bennett, who has accused Gov. Andrew M. Cuomo of sexual harassment, wrote in an op-ed on Saturday. “Failing that, even a simple ‘That’s not funny’ would have sufficed.” More