How to defend Scholar's mate.
OP defense is solid.
Another way to defend against the Scholar Mate is to play in a more aggressive sacrificial way.
White plays Qh4 attacking the e5 pawn.
The OP showed the Nc6 line which tries to defend and save the pawn.
Another way to play is to sacrifice the pawn as a Gambit to create a massive lead in piece development.
Then you try to use the lead in development to crush white in a very aggressive counter attack.
The only tricky part is you have to make sure your playing aggressively as Black because if you don’t white will catch up in developing and they will be considered winning due to winning the E5 pawn that you gave up.
So the line is more risky, but if played correctly it can be extremely dangerous against white.
The OP way and the way I showed above are the 2 most common ways the Queen Attack line gets shut down which is why it isn’t popular in higher levels of chess because it doesn’t work as well and Black often can end up better.