Such questions are critical. The NYPD considers them after every attack around the world, and adjusts its policies and practices accordingly. That’s a key reason the city went 16 years without a fatal attack.

Cops are “working tirelessly to prevent anything like this from getting repeated,” notes Police Commissioner James O’Neill. And the entire city is grateful for it.

Similarly, President Trump on Wednesday focused on finding ways he feels would better secure the country, such as tougher and quicker punishment for terrorists and scrapping the “diversity visa” lottery that let Sayfullo Saipov enter America in 2010.

Yes, US vetting of those allowed in via the lottery has improved greatly since then. But it’s still surely worth looking at a program that accounts for 5 percent of all legal immigrants — and was begun in 1990 as another patch on a dysfunctional system.

After all, Democrats agreed to scrap it in 2013, as part of a broader immigration bill that ultimately died, as did a similar reform in 2007. Blame those failures on the same hyper-partisanship and finger-pointing erupting in the wake of Tuesday’s attack.

The kind, that is, that stymies efforts to make the nation’s immigration laws more rational — and more effective at blocking bad actors from entering.

In the end, though, let’s face it: Attacks like Tuesday’s are extremely hard to stop.

That’s no reason to treat them as the new normal. O’Neill is right: “It will never be something any of us will just accept as inevitable.”

Rather, it’s cause to redouble efforts — and rethink even sacred programs and policies, in the hope of preventing more horror.