Zohran Mamdani became the mayor of New York City early Thursday at a small ceremony in a decommissioned Gilded Age-era subway station—a location he chose as a testament to the city’s history of building great things to transform the lives of working people.

The 34-year-old democratic socialist took the oath of office administered by New York state Attorney General Letitia James , a close political ally. The ceremony was held under the grand tiled arches of the station beneath City Hall.

“This is truly the honor and the privilege of a lifetime,” Mamdani said just after midnight, with his wife by his side. A bigger inauguration ceremony is scheduled for Thursday afternoon on the steps of City Hall, as well as an outdoor party along several blocks of Broadway in lower Manhattan. Tens of thousands of people are expected to attend the celebration, according to his advisers.

Mamdani, New York’s youngest mayor in more than 100 years, takes office laden with expectations that he can bring relief from the city’s high cost of living —along with concerns from business leaders that his untested policies could cripple the economy and lead to a resurgence in crime.

New Yorkers swept Mamdani into office on the basis of an ambitious affordability agenda that includes curbing soaring rents, expanding free child care and creating a free bus system. He will have a short runway to show people he is on the path to achieving results.

“You are given about a week to deliver,” said Andrea Hagelgans, a former senior adviser to Mayor Bill de Blasio . “We have no patience as New Yorkers.”

Mamdani should focus on the policies for which he can lay out tangible goals in a relatively short time frame, Hagelgans said. Building additional affordable housing will take years and might not be completed during his time in office. He should pair that effort with expanding child care, which would bring quicker results and carries broad appeal, she said.

A free bus service is also realistic, but it is expected to cost $800 million annually and would require coordination with the state’s transportation authority, which operates the city’s transit system. Mamdani also can try to freeze rent increases on rent-regulated apartments, but that would affect only about a quarter of the city’s housing stock.

Pulling off any of his big-ticket proposals will mean compromise and at times appeasing his opponents, especially the business community, which has been an important ally even for progressive mayors in negotiating funding and policy initiatives with state lawmakers.

“I would not be surprised if he becomes more moderate in his stances,” Hagelgans said.

In just a year, Mamdani—an immigrant from Uganda of South Asian descent—has gone from a virtually unknown state assemblyman to a rising star in the Democratic Party . His focus on affordability and adroit use of social media in his campaign attracted young voters and members of immigrant communities.

Mamdani’s lack of experience and identification as a democratic socialist also has unnerved many of the city’s powerful elite and made him a prime target for President Trump . Since his victory in early November, he has been walking a tightrope, trying to make nice with his political adversaries while staying true to his far-left supporters.

Mamdani has tried to allay the concerns of Wall Street executives and real-estate developers, who are skeptical of his plans to raise taxes on the wealthy and corporations to cover the hefty price tags on his proposals. (His campaign estimated that the city would need about $6 billion a year to cover free child care for infants to 5-year-olds.) Critics have also questioned the effectiveness of his policing proposals on public safety, including creating a new city agency that deploys mental-health teams in response to some emergency calls.

In recent weeks, he has hosted roundtables with members of the business community to discuss ways to cut through the red tape of building affordable housing and to find common ground on child care. In another overture, he persuaded Jessica Tisch —the city’s police commissioner—to stay in her job in his administration.

Despite the outreach, members of the business community remain wary of Mamdani, saying they are disappointed he hasn’t appointed more people with private-sector backgrounds to his new administration.

“I think it’s the ideological pieces that get people nervous,” said Daniella Ballou-Aares, CEO of the Leadership Now Project, a business group of 400 politically active current and retired business executives. “But it’s mostly waiting and seeing how things play out.”

Since his victory, the new mayor has also sought to defuse tensions with Trump, with whom he had traded barbs during the campaign. Trump had previously threatened to deploy National Guard troops to New York if Mamdani won the election. But the two politicians had a congenial meeting at the White House in late November, with the president saying he was optimistic about New York’s future.

Mamdani is expected to loom large over the coming state legislative session, which begins later this month. State lawmakers would need to approve any additional funding to the city or tax increases.

“He goes up to Albany with the political will in his fist and the wind at his back,” said former New York City Councilman Justin Brannan.

Brannan, a Democrat who chaired the council’s finance committee, added Mamdani can look for wiggle room for his proposals in the city’s $116 billion budget. “It’s all about priorities,” Brannan said.

Write to James Fanelli at james.fanelli@wsj.com