they should commandeer the borg’s cube ship design and get a real spaceship for once
this could come about as the enterprise is attacked both sides manage to transfer their crew to the other resulting fighting in the corridors
one development could be that before the fight everyone goes into some mind machine that conditions them for hand to hand fighting and weapons training as a last ditch attempt to win the battle.
the borg is still firing rounds at the enterprise but the enterprise can’t fire back as they have hundreds of crew on board fighting in the passageways of the borg ship. even if the borg manage to destroy the enterprise they would still have the little matter of the problems prowling the decks destroying any borg they discover – normal hand guns have been 3d printed on the enterprise as a surprise tactic to take down the borg conditioned to defend against phasers.
the enterprise now takes position around a moon to try to evade the borg ship seriously damaged, with 3/4 of the crew on board the borg ship dead the borg decide that the contamination has gone on far too long and decide to go into a self detonation sequence as well as transmit that its going to suicide to stop the enterprise taking over its vessel.
the enterprise gets wind of the losses on the cube ship by the date being streamed back and makes a bee line for the cube ship , the shields of the borg ship have now been knocked out by the fighters onboard and now enterprise already fatally wounded comes at the borg ship transporting as many people as it can to the cube ship as it brings its shields up and down to do so, the borg ship is firing furiously taking chunks of abandoned infrastructure of the frontal part of the ship out as it transfers people to the borg ship
meanwhile onboard the fighters have located where the queen bee is located and rig up an IED in a corridor where the queen would be expected to flee or mount an attack, the queens takes the bait and is permanently taken out leaving the ship leaderless with no further with no effective orders coming from the control deck.
the last of the survivors and equipment of the enterprise transfer to enterprise – as the borg ship gunners are still at their posts obeying the last orders
the borg ship is now in star fleet hands and the destruction halted as they get into the main system and shut down the main engine which was being ramped up to act as the bomb on board.
the remaining borg wounded are rounded up and held in detention until they can work out how to deal with them
all they have to do is get the main engine up and running and get out of dodge before the borg fleet can appear over the horizon.