Estate 401K and IRA with no beneficiaries

I am the executor for my nephew who passed away in Massachusetts in August of 2021.  He left a 401k and an IRA with no beneficiaries.  The money is going to his estate but we need to use most of it to pay outstanding bills.  By intestate law, his mother will get the remainder.  Even though the money was used to pay bills, is the Estate responsible to pay the taxes owed on the withdrawal on the 1041?  The amount is about $32,000.  If so, what if there is no money left?