Xabi Alonso made an excellent decision to continue with the team next season. Leverkusen will play in the next Champions League, they will need a coach like Xabi Alonso because he has played in major competitions such as the Champions League. I can't wait to see the club compete with the clubs from other leagues, as we have seen how they competed with Bayern Munich for the Bundesliga title race this season. You're right, they need to add more players next season, so they shouldn't be eliminated so easily, because they will face difficult challenges in the next Champions League if they meet a major team like Real Madrid or Manchester City, we don't know if their current players will have strength to play this way next season.
Xabi is taking risk by staying in Leverkusen as they might not be able to repeat this success next season. With limited player resource, they will have big troubles by defending their Bundesliga title while discover Champions League. It will put Leverkusen under pressure of using their player resource very wisely to maintain good performances in Bundesliga but still don't affect their discovery about their own ability in Champions League.
They are both big tasks for Xabi Alonso and his players next season and I think Xabi decided to stay because he aims at a coach position in Real Madrid that is not available this summer. They will complete the contract with Carlo Ancelotti before finding a new coach in 2025 summer, not this coming summer next 3 months.