Under US bankruptcy laws corporations can file for bankruptcy for the purpose of reorganization of debts (chapter 11) or for liquidation (chapter 7).
Under reorganization the expectation is that you are trying to rehabilitate a failing business that may be profitable again - so the business continues running, and can even borrow money - though your business actions are monitored and ultimately may be approved by the court.
Under liquidation, you auction off everything that isn’t bolted down (and some things that are).
You usually restructure businesses that could emerge from bankruptcy and be profitable again, and liquidate those that can’t. Which one Twitter may be can be debated.
Here’s the rub, though: in chapter 11, the courts have a huge role. They approve your restructuring plan only if it’s fair to your creditors. They have to green light quite a few actions you might want to take in the course of running your business. They might form a creditors committee out of the people you owe money to and take their advice on decisions. It’s a long and drawn out process that requires calm leadership willing to work with ones “adversaries” to come to an agreement.
And no matter your opinion on Elon, positive or negative, I doubt many people would say his reign at Twitter suggests he’d do that.