No court in any way "gerrymandered" New York in FAVOR of the Republicans. What a court did was to simply (and probably temporarily) disallow a ridiculous hyper-partisan DEMOCRAT gerrymander and drew the lines a little more fairly and in a more non-partisan fashion.
The GOP picked up several New York districts this time around -- and in *most* cases probably will not win them again -- despite the fact that those surprise victories all took place in districts where Democrats still outnumber Republicans: CD-3, CD-4, CD-17, CD-19, CD-22 (FWIW, Trump lost every single one of these).
That's why they were surprises, and is also why those outcomes are unlikely to be replicated even if the Democrats don't implement another gerrymander for 2024.
The national DNC vote fraud machine spent the normal New York vote-rigging cash elsewhere, picking up US Senate seats, and relied on the local vote fraud machine to "get 'er done", in the face of a very real Red Wave.
Same thing happened in California, where not one California Republican US House seat was lost, and they in fact picked up two seats.
The thing that people need to understand about the vote fraud - they only have so much money to create "ballots", so the factory-style rigging isn't everywhere.