If you can get the bankruptcy file before the levy then the creditor can’t levy. The bankruptcy filing creates a stay which stops all collection action against you.
If the creditor has already levied by the time you have filed you may be able to get the money back after you file under 11 USC 522(h).