I think Xavi's decision to resign is the right one. Xavi loves this club. And he is a living legend of Barcelona. He was the coach of this club for the last 2 years. And despite Barcelona not being in a good position, the team won the La Liga title last season with the help of Xavi. But now Barcelona face a bigger problem. The team's performance this season has been erratic. Also their financial condition is not good. So Barcelona needs a more experienced coach.
If Xavi remains as the coach of the team, it will not be good for Barcelona and Xavi. Barcelona fans might start trolling Xavi too. Perhaps this is why Xavi has decided not to stay at Barcelona at the end of this season.
It is not profitable for Barcelona to fire Xavi now, due to money problems, they will not be able to hire a good coach, and it is clear that no one will agree to work for crumbs. So, most likely Xavi will work with the team until the end of the season, but he says that his decision is final, he will leave the team after the end of the season. So, in any case, the team will be coached by a new coach, but who it will be is still unknown. This situation will not be the best for the club, and if everything only gets worse, then perhaps a replacement for Xavi will be found earlier.
They do not have to "hire" a new manager, they could simply put someone who is already there in charge if they wanted to fire him. His assistant, or la masia main manager, or just anyone really, you can put the head scout in, or thee general manager all I care. The point is that, they already have people who are employed as managers, or people in the football world, and for a few more weeks, they could just hire those people, and the games will be ending at around April, rest will not be important, so it is just a few more months to handle.
If the goal was to fire Xavi then they would have done that. The goal is that they didn't see what they saw, and Xavi agreed, Xavi just couldn't get the players to listen to him, that was the issue, so they will separate peacefully.