I remember learning python in high school by following the tutorial in the official docs, then from a book. Up until function and OOP, it was fairly easy, but I gave up afterwards because the exercises touch on things I haven’t learned yet like trigonometric identity. I could see and understand the syntax, but I couldn’t understand the code.
This is why children can easily learn enough programming to create games, because it’s a domain they can comprehend easily. Just like they can use english to write about their daily lives. It will be simple sure, but it will work.
So learning to code is fairly easy, you can easily create simple programs after a weekend. More complex programs will still use most of the same basic concepts as far as coding goes, but you will need to master more complex concepts, and that takes time. And such concepts are not about coding, they are about the nature of computing or the domain the software is created for.
This is why experienced devs only need a few days doing kata to get up to speed with a new programming language. It’s usually the same old, with slight differences. What was always needed was an understanding of computing and the ability to break down problems and create a solution that can be computed.
Coding to me is the same as drafting an engineering schematics, or writing a sheet music. It’s just a tool, not the end result.