If you're going to use a nuclear weapon, it would be much more expansive in terms of the damage.
First of all, like anywhere else, a nuclear explosion in space is absolutely unacceptable at any level. It's the same with an ASAT test.
I'm an environmentalist. You don't want to put any explosives up in space, because the debris stays for decades. It goes up and it goes out, because you're shooting from the ground, and it tends to go up further. The further it goes up, the longer it takes to come down, based on gravity.
It's not acceptable. There are various orbits in space that are prime real estate. SpaceX occupies the most prime real estate. That's a chain they call the Starlink orbit. It's very heavily populated. Causing a chain reaction in that orbit would be devastating to communications.