Hmmmm as a newbie coder i'd say it depends with the person trying to learn. For me i just make some prototypes from time to time to experiment with the coding, (tutorials and online ressources are a go-to), i'd set an objective like making a specific mechanic and try and build upon it.
Most important is setting a precise learning goal, for example making some grappling hook physics or experimenting with AI's.
In my opinion, best way to learn coding with a specific language is simply experimenting, with the number of ressources we got in 2023 we got a really nice basis as newbies anyways :D
To simplify, experiment and look up ressources!