A healthy approach towards learning openings is to retain the key ideas involved, and not to necessarily memorise move by move unless it's an extremely precise sequence in a very theoretical line (as is often the relevant case at high level chess). It's a bit analogous to how one would learn physics, by understanding the principles, drawing connections between them, learning to how reason with them and so on, such that ultimately, you can reconstruct theorems in your head, as opposed to memorising them symbol by symbol.
Now in chess, understanding the ideas in the opening phase simply starts by asking yourself questions when you're exploring an opening: for example: "what is the point of an early h6
here? what I am preventing and why is it with such priority?" or "what is Qc2
achieving in this situation? can't I achieve the same with Qd3
?" or "Could I not have played Nf6
first without loss of tempo?" and so on.
In trying to answer those questions for yourself, you will automatically uncover the pitfalls, or the wrong/less optimal alternative moves, without necessarily seeing them listed in a book. Now of course one can never exhaustively do so, as there are simply too many variations in each opening or certain very hard to grasp ideas involved, and that's why there are thick books written on almost every opening, but that said, the essential part of any improvement you are going to make, will result from the struggle of trying to understand a position on your own. It is this struggle that will form your mindset for how to reason about openings in general, one that will continuously evolve for as long as you study chess.
Now in order to find the answers to the type of questions I had mentioned earlier, you need to consider two important aspects: a) a general strategy in mind for what the opening is trying to achieve, b) a concrete assessment of the variations involved such that the strategy in a) can be efficiently implemented, i.e., avoiding redundancies or other loss of tempi, not creating weaknesses or easy targets, and worst case avoiding blunders. This is the part where engines can immensely simplify the task.
Both are equally important. Luckily, the bulk of opening theory we have stems from human play and not computers, meaning players at some point attempting to tackle a certain move differently by emphasizing a set of key new ideas. Luckily, because it means we have a chance of understanding them if we manage to trace the original ideas.
In your example: the essential part of the Dragon variation for black in the Sicilian is the fianchetto'ed bishop on g7.
Simply put, unlike most other Sicilian variations where the dark-squared bishop has very little active scope (instead being developed as a purely defensive piece), the Dragon is an alternative that provides more active prospects for the bishop, with a safe developement (fianchetto - making it hard to trade/challenge the piece) and with a follow-up that emphasizes undermining white's dark square control. This is a rough sketch that goes along the point a) we were discussing above. Now more along point b), namely the more concrete aspects of the opening, contains the answer to your Nf6
question: by not playing Nf6
too early you i) entertain the possibility of potentially developing the bishop to g7
with tempo, as it will directly eye the d4
knight and ii) you prevent the option of an immediate e5
from white. As you show, Bg7
forces a reaction such as Be3
and then you include Nf6
(rendering immediate e5
less critical after Nxc6
, see diagram) Whereas with for example 5...Nf6
(so before the bishop), you allow white an easy path to playing e5
closing down the long diagonal and dislocating your f6
knight. The comparison is illustrated below:
[title "Importance of early Bg7 in Dragon"]
[fen ""]
1. e4 c5 2. Nf3 Nc6 3. d4 cxd4 4. Nxd4 g6 5. Nc3 Bg7 (5...Nf6 6. Nxc6 bxc6 7. e5 Ng8 {without tempo, white is free to develop aggressively, no tempo invested on Be3 or on the defense of e5} (7...Nd5 {with 5...Bg7 and Be3 included, this is a good gambit, with about equal play} 8.Nxd5 cxd5 9.Qxd5 Rb8 10.e6! fxe6 11.Qe5 {forking black's rooks : this tactical shot wouldn't be available after 5...Bg7}) 8. Bc4 Bg7 9. Qf3 e6 {rather forced} 10. Bf4 {white is objectively better as they have fully developed, they have the better minor pieces with central control, they have induced important dark square weaknesses in our position by forcing e6. Instead, black is critically under developed and without any real active prospects.}) 6. Be3 Nf6 7. Nxc6 bxc6 8. e5 Ng8 {the knight is retreated with tempo as e5 is under attack. Sure it's a bit slow, but black has a healthy pawn structure, a target on e5, and a relatively easy development to follow. Two main variations exist here, 9. Bd4 Qa5 and 9. f4 f6, see Kasparov-Ivanchuk 2002 for a nice example. }
So you see, by bearing in mind that with a tool such as the Dragon black intends to play actively and eventually for the initiative, and going through the respective variations of 5. Bg7
and 5. Nf6
we've come to the conclusion that Bg7
is the key move here for black in order to not lose pace with white's development/play while keeping active prospects open (make sure to go through the Ivanchuk game I mentioned in annotations).
In fairness, there are much simpler examples to use for the purpose of our discussions. Let's choose a line in the queen's gambit exchange variation (see annotations for discussions):
[title "example #2: queen's gambit exchange variation"]
[fen ""]
1. d4 d5 2. c4 e6 3. Nc3 Nf6 4. cxd5 exd5 5. Bg5 c6 6. Qc2 {One wonders, why Qc2 so early? as opposed to e3 for example. In the exchange variation, black often struggles to create active play, and one reason is the c8 bishop which has a hard time of becoming useful. Qc2 is played early to take away the only remaining active bishop move, namely, Bf5!} (6. e3 Bf5 {black has developed their only potentially poor piece in this variation, as it went unchallenged by white.})
In short, in the exchange variation white is committal about the centre early on (cxd5
) and continues to play actively with Bg5
forcing c6
, followed by the simple usual setup of e3-Bd3-Ne2-f3
setting up e4
push (once castled of course) and a potential minority push on the queen-side. Concretely speaking, you want to achieve all this while not allowing black to develop easily or to create active play. So you start looking more carefully at the position, and only then realise the importance of nuanced moves such as Qc2.
You may argue, why can black not play g6
immediately after Qc2
in order to revive the Bf5
idea while preparing to fianchetto the f8
bishop? whether or not a case can be made for that idea, the important thing is that this process of asking these kinds of questions and trying to find the answers to them on your own is how you should learn openings and how you eventually form a mindset for how to think about them in general such that you can even start developing your own systems for facing various things.