This has to depend a lot upon the kid. My 6 yo really wanted to learn to program, so we did it over spring break one year.
I sat with her for a 1-3 hours a day for a couple of days, individually teaching core concepts. During this time I let her operate the computer exclusively. I watched, gave advice, drew pictures on paper, and didn't use my phone. I think being hands-off but present and engaged is critical. When I was a teenager I used to tutor grownups on PCs and found that having them drive the computer was the most effective way to ensure I wasn't losing them. After the first few days I found I could teach her something, make sure she was doing OK with it, and then go away for a few minutes to do something else and return to answer questions.
I had drawn up a list of concepts I hoped to teach, and shared that plan with her and used that as a general direction. Nonetheless, what we actually did was directly guided by her interest level and enthusiasm each day. I aimed to keep her engaged and focussed and adjusted speed and content to do so.
I opted to use a fairly old language environment, Logo. Drawing pictures is directly appealing to kids, and using a text-based programming environment exposed her to syntax and learning to edit actual code right from the get-go. I don't think drag-and-drop learning such as one gets with Scratch or Blockly translates very cleanly to other programming environments because you're only learning procedural concepts, not that commas and quotes and other kids of precision matter. For instance, because she needed to know syntax I showed her how to access and read the docs. That led her to discover that the specific Logo we used, ACS Logo (Mac), has speech synth support. Then she started using the speech synth to narrate her drawings. That was pretty cool and a big success she could claim for herself.
We did not make it through my whole list of concepts, but she did attain independent fluency with a subset of Logo and programming in general. A bit over a year later she periodically updates/extends her programs. And I recently watched her independently learn 2 other programming languages, one via watching videos, and another via an online course. So it's clear she is able to apply what she learned to new contexts.
In a telling comment that seemed to me to confirm my choice of Logo, she learned quite a bit of Python and then complained the language couldn't do anything she cared about. Of course that's naive, but it illustrates that you need to pick an environment with features that will appeal to your child early on, not in some far-off land after one has learned the basics. In this vein, you might also consider introducing a kid-oriented robotics microcontroller like the Hummingbird Duo. These have the appeal of making physical things light up, move, and sense. This will likely rate much higher on a kid's priority scale than building a website or crunching numbers. My daughter is now learning to build simple robots with a Hummingbird Duo and a bunch of sensors and servos and likes it. And even though this too is programming, it's a very different set of complexities than what she did before.
Good luck!