there's nothing (else) for it (but to do something)
There is only a single course of action that can achieve the desired or necessary result; there is no alternative to a certain course of action. We finally had to trade in our old, much-beloved car to buy one that had more seats and more space; with three young kids, there was nothing else for it. The virus wreaked so much damage that I'm afraid there's nothing for it but to replace the entire computer infrastructure.
nothing for it
Nothing else to be done; no alternative: "There is nothing for it but to wait for the end" (Samuel Beckett).