In fact, competing in such difficult matches against strong teams like Paris Saint-Germain provides crucial experience for Real Madrid. This tournament was particularly important for Xabi Alonso to see the team. I'm sure his thoughts on the players have become clear. He's tried various players in various positions and now he likely has a plan in mind. The defeat to Paris Saint-Germain also highlighted their defensive difficulties. They must be much better now.
Actually, this only gives experience to Alonso and maybe a few young players, but not to the team as a whole, because Real Madrid has enough experience of this kind. It's bad that they suffered such a defeat on the eve of the new season, it can have a negative impact on the players, although as I already said, these are quite experienced players and they are unlikely to worry much about this defeat, but it showed that Real Madrid still has weak points and they were unable to get rid of them.
Alonso definitely needs to gain experience as a coach. No one knows how to manage teams like this right away, as if by magic. It's something that also comes from experience, and it's easy to make mistakes when you find yourself coaching a big club right from the start, so it takes time. I've seen that he's done away with top players like Rodrygo, and that seems absurd to me.