The decision upholds a regulation issued in 2022 by the Biden administration that was strongly supported by police and prosecutors. It’s a rare win for gun control advocates in the high court.