When I follow a tutorial, I like to play with the code. Instead of copy/pasting the provided code verbatim, try experimenting with it: what happens if you omit one of the lines? Or if you change some of the values?
I try and act like a scientist. If I have a hypothesis about how this code is supposed to work, I test that hypothesis by changing the code, and seeing if it breaks in the way I expect. When I discover that my hypothesis is flawed, I might detour from the tutorial and do some research on Google. Or I might add it to a list of “things to explore later”, if the rabbit hole seems to go too deep.
This process helps us avoid the sinister rhythm of following a tutorial on autopilot, copy/pasting code without really understanding what it does or why we’re doing it.
Learning is an active process. Poking and prodding at the code will help us build a mental model for what’s going on.