Either the definite or indefinite article is possible here. As a native English speaker, I would prefer the indefinite in this context, but it is a very weak preference.
Basically, it comes down to the fact that the definite article is often used to discuss a specific entity that has already been under discussion. If we saw “the new generation” here, we expect that we can look earlier in the text to find where this generation was introduced and explained; we expect there is more information about this generation that has already been established and that the text is assuming we are familiar with. Which means that, if we don’t remember this generation having previously been introduced, we may go looking for it (or asking after it, in spoken conversation).
Since this generation hasn’t been previously discussed in the text, the indefinite article is clearer: this new generation is one we are first encountering right here, and everything we need to know about it is going to be explained within the text we’re about to read. We haven’t missed anything; we don’t need to go back and reread anything.
Unfortunately, this is not the only way the definite article is used. In other contexts, the definite article would be appropriate even if it was the first time the indicated object was brought up. But because those contexts would use the definite article that way, using it doesn’t risk misleading readers.
In other words, it is, as usual for the English language, a matter of convention. It is customary to use the indefinite article here. Using the definite article isn’t wrong, but might give the wrong impression. And, in all honesty, it probably would not. The convention is fairly weak, and odds are a reader won’t even notice it either way, and you totally could use the definite article without issue. But when you draw our attention to it, and ask for a considered opinion on which to use, I say the indefinite article was the correct (or at least, more correct) choice.