I think that the main problem for Real last season was their defense, because their attack played quite well. Even when Mbappé or Vinícius were injured for some time, they replaced each other and the attack performed quite well. Last season there were very big problems because they lost two key defenders, Carvajal and Militao were missing, and they conceded too many goals. If you remember the matches against Barcelona, it was Real’s defense that let them down.
People keep failing to see that the defence was not the only issue, but the midfield was a problem too. The midfield couldn't keep control of the ball when they won it back. Also, the pressing of the team last season was very poor. They allow the opponents to get so comfortable with the ball. If you play like that, you'll struggle against good teams.
If you watch Madrid this season, they press very well. They don't allow the opponents to get comfortable on the ball, and that is why its difficult for teams to create chances against them. Now Madrid pins the opponent in their own half and presses them in numbers to win back the ball immediately they lose. If they continue and improve on that while being able to keep the ball comfortably, they might have a good season.
Talking about Madrid's performance last season. For me I think it was just a downtime for them as a team and individual performance. Though some of them were performing, but I see it as it was there bad season. Even in Laliga, Barca was on them the whole season.
Generally, there are times when a team under performs, while sometimes too, a team becomes at its best. Just like Manchester city in England, they are still struggling even in this new season, two straight loss. So for Madrid, it think it was a bad season for them. Hopefully, they are retracing Thier steps and maybe may get it right and continue strong.