Superstorm Sandy hurtled into New York in 2012, leaving the city flooded, reeling and contemplating its vulnerabilities.

Five years later — in the wake of devastating hurricanes Harvey, Irma and Maria — the city is still trying to figure out the best means of preventing another mess like the one Sandy left.

“There’s been a lot of work done. The question is, ‘How does this compare to the scope of the problem?’ ” said Steven Cohen, professor and executive director of the Earth Institute at Columbia University. “It’s very hard to predict what the next one’s going to look like, but all of these measures are helpful. When you have these events, you’re going to suffer damage but hopefully . . . we’re getting a little smarter about it.”

In some key areas, city agencies and private companies have made strides, shoring up vulnerable infrastructure and improving systems to better alert New Yorkers in the face of disaster. But other areas, such as minimizing storm surges (the highest was measured at Kings Point in Nassau County at 12.65 feet), still need to be addressed.

“We’re better off than we were,” Cohen said. “Whether we’re good enough, we won’t know until we get tested.”

In an effort to keep track of the recovery efforts, the City Council earlier this month voted unanimously to approve a task force to analyze what went wrong during and after Sandy and how to best correct it, according to Councilman Mark Treyger, the bill’s sponsor and chair of the Committee on Recovery and Resiliency.

“We need a better blueprint moving forward,” said Treyger, whose district includes Coney Island and Bensonhurst. “We need to identify mistakes that were made and we need to crystallize those lessons learned.

“And time is of the essence,” Treyger added. “The time is ripe to have a serious examination of this recovery process from the inside out.”

Here’s a look at some of the changes New York City has made, as well as some of its most susceptible infrastructure issues:

FLOODING

The largest amount of damage incurred during Sandy was due to flooding caused by storm surges, though in terms of actual rainfall New York City received relatively little — less than an inch.

There are many proposed fixes for flooding, but there is no one-size-fits-all approach, experts said.

Daniel Zarrilli, senior director of Climate Policy & Programs and the city’s chief resilience officer, pointed to a number of neighborhood-specific projects that are in the works or have been completed, including fortifying the Boardwalk in Rockaway with concrete and installing sea groynes — rocks built up that help keep sand in place — in Seagate.

He said the city has also installed interim flood protection measures in Red Hook, such as 4-foot high barriers in the lowest-lying areas, but it’s waiting on final approval from FEMA for $100 million to fund more permanent solutions.

“All of the investments are really tailored to the neighborhood that we’re working in,” Zarrilli said. “Building the flood protection in a way that integrates better into the neighborhood.”

Another project in the works is The Big U — a multi-phase perimeter protection effort for lower Manhattan developed by a coalition of architectural, environmental and other groups. Its first phase, the East Side Coastal Resiliency project, is set to break ground in 2019, with $760 million allocated by the city and the federal government.

Another possible solution for minimizing flooding is storm surge barriers, which would be implemented at four strategic spots: the Outer Harbor Gateway between Sandy Hook, New Jersey, and Rockaway; the East River between Queens and the Bronx; East Rockaway; and the Jones Inlet.

Bill Golden, president of the National Institute for Coastal Harbor Infrastructure, a nonprofit working to stormproof coastlines, said he believes storm surge barriers are the only sure way to prevent another Sandy-level disaster.

“In the longer term, the only solution for [flood zones] is a regional storm surge barrier system that could protect the city for 100 years,” Golden said. “These barriers would remain open except in the case of an extreme weather event. In those cases, they would be closed at low tide. There would be no death and destruction from flooding. . . . In other words the next Sandy would just be a windy day in New York City.”

The concept is being evaluated by the Army Corps of Engineers, but it’s costly, potentially costing billions of dollars.

“Those kinds of projects are very large and expensive projects,” said Cohen. “In a sense, you’re betting everything on one big solution.”

He argued “a decentralized approach” to protecting against a future storm is best. He added that many developers learned from Sandy and are now putting utility rooms on higher floors and waterproofing infrastructure to cut recovery time.

The Regional Plan Association has proposed setting up a Coastal Commission. The commission would be a new agency tasked with creating and updating regional coastal adaptation plans. The agency would be funded from regional property surcharges and casualty premiums.

MTA

With so many facilities underground and in low-lying areas, the Metropolitan Transportation Authority was particularly vulnerable to the storm. Floodwaters badly damaged nine underwater train tunnels and yards, as well as stops and stations close to the shore. The new South Ferry station in Manhattan was destroyed — only to reopen earlier this year.

This spring, the agency addressed the threat of rising sea levels in its first Climate Adaptation Task Force Resiliency Report, which outlined the “urgent reality” of climate change. The agency has identified 46 major projects focused on climate resiliency that have either been completed or are underway — valued at about $3 billion.

Nick Sifuentes, executive director of the Tri-State Transportation Campaign, praised the MTA’s resiliency efforts in the short term, such as acquiring and deploying storm gates to block water from coastal stations. But there are looming funding concerns for the agency.

“I think the MTA has made significant strides to make sure the system is ready for a Category 2 hurricane,” Sifuentes said. “But they say they need about $3 billion for projects. Only a fraction of that has been committed at this point and funding is the major question when it comes to this work.”

The most impactful project looming is the L train shutdown, which will force the closure of service to and through Manhattan for 15 months beginning in April 2019 as the agency makes critical repairs to the flooded Canarsie Tunnel under the East River. MTA Chairman Joe Lhota assured that the agency is working with the city to put together a plan to keep commuters moving during the work, noting the success of the agency’s mitigation efforts at Penn Station this summer.

“Five years ago, that tunnel was filled up . . . with 7 million gallons of . . . corrosive salt water. This tunnel was built in 1924 and when they built it in 1924, they never expected the storm like that,” Lhota said at a Brooklyn Chamber of Commerce event last week. “All of our tunnels have been like that. This is the last one.”

ELECTRICAL OUTAGES

During Sandy, all of lower Manhattan was plunged into darkness when a transformer on East 14th Street exploded. Add additional outages caused by flooding and winds, and Con Edison reported more customer outages than any prior storm, according to a company spokeswoman.

The storm and the nor’easter that struck the city a week later caused 1.1 million outages in the city and Westchester County.

Following the historic storm, the utility began upgrading its infrastructure to prevent this scale of outages from happening again. Last year, Con Ed completed about $1 billion in upgrades.

Those upgrades have since prevented 250,000 electrical outages, a spokeswoman said.

“The efforts undertaken by Con Ed, and a great number of other utilities across the state, are aimed at ensuring that such a disaster as Sandy on that scale will never cause similar damages,” said Yury Dvorkin, assistant professor in the Tandon School of Engineering at NYU. “It’s important to emphasize here that no matter what Con Edison does, despite their best effort, there is still a possibility that there will be power outages caused by a natural disaster. There is a lot more work to be done.”

Con Ed said it has installed submersible equipment that’s able to withstand flooding, in addition to installing more than 1,000 “smart” switches designed to prevent homes from losing power in the event a tree, wind, or snow brings down a line.

Con Ed has also redesigned two electrical networks in lower Manhattan, according to the spokeswoman, allowing operators to preserve power for inland customers while de-energizing equipment to protect it from flooding.

ALERT SYSTEM

The city’s main alert system, NotifyNYC, was in existence during Sandy, but has significantly expanded since then.

From Oct. 27, 2012, to Nov. 27, 2012, the city’s Office of Emergency Management sent out 67 messages to 165,000 people registered with the system.

Since then, NotifyNYC has added more than 400,000 subscribers. Last month, the city launched an app for Apple and Android devices with about 30,000 downloads so far, according to the agency.

The program, which launched in 2009, allows users to sign up for up to five different ZIP codes. An agency spokeswoman said the app can also track your location as you move around the city.

OEM also maintains two other notification programs: NYC Severe Weather, which was used during Hurricane Irene and Superstorm Sandy, and Know Your Zone, a guide to hurricane evacuation zones. More detailed research led to the creation of new flood zones after Sandy, expanding from three zones to six and covering more area.

With Vincent Barone