When you're coding via tutorials, are you grasping what you're typing?

Tutorials are helpful, but sometimes I wonder how I could retain the information. Because it's one thing to copy, but it's also another thing to understand.

Like I see these youtubers typing away and giving instruction. Is there a point where you know code by heart after a while and can just make an application without consulting tutorials? I mean there's always gonna be something you would need to look up. But what I'm thinking about is that how do you learn to grasp what you're being taught and understand why your typing what your typing.

Like not just following but understanding what a certain function does and how it can be utilized in different ways.

Understanding is something I wanna get my ADHD mind to understand.