I've just watched the extended highlights of the game and frankly, despite the result, Stuttgart looked like a better team. They absolutely dominated the first half, they had a lot of great chances to score but were just out of luck.
The second half was more even and it was Real who came on the top, but we have to give Stuttgart a due credit. They played a really good football, dominated in ball possession and created better chances. If they keep playing like this, they could turn out to be a dark horse of this season UCL.
You're right, Stuttgart dominated Real Madrid in the first half of the match, behaving like a team that hasn't missed a Champions League match in a long time. In fact, I asked the person sitting next to me during the live game if Stuttgart was the same team that played in the Bundesliga because of how different their performance looked. Maybe they were hiding players to play against Real Madrid in the Champions League because they had only won two of their previous four league games. Stuttgart's lack of experience against Madrid was clear as they wasted several chances to score, and Real Madrid was lucky to have a quality goalkeeper, if not for him, Real Madrid would have lost the match.
Furthermore, I believe Stuttgart's attacking players need to develop more confidence in the Champions League because they lack scoring experience. To be honest, they played more than we expected, but the victory was not on their side.