I'm 53, been in tech full on since 95, Linux since 96(?). My wife is probably one of the top data optimization experts in the world, and for sure the top, by far, in her specialization. We both learned the same way.
Find a problem to solve or task to accomplish. Figure out how to do it with the skill you are trying to learn.
or
Find code examples that perform certain tasks, read them, and try to figure out the logic and the syntax. If you do this, try to modify the sample code to achieve a solution for the first example.
IMHO, learning software development from a blank file is frustrating, unnecessarily difficult, and more difficult to correlate to real solutions. Secondly, learning to read, understand, modify, and correct code better prepares you for the realities of a world where execs expect the bulk of the code to be LLM generated and then curated by a humans.