I reckon there are two parts to learning programming, with neither taking priority
Trying out simple stuff - like the examples that come with the Arduino IDE and modifying them a little to gain confidence.
Studying the basic concepts of programming (which are pretty much universal and independent of particular languages) such as arrays, FOR and WHILE loops, variables data types etc.
Successful programming also needs the ability to diagnose problems by being nitpicking and methodical.
...R