Hi. I used to say it's like learning a new language, but it's actually like neither option You gave for an answer, because there are technically many different languagwes that can be used to program / code. It really can become like a World tour of 15 or 50 different countries / locations.
The best way I can explain it is to compare it to standing in front of a toolbox from a Master tradesmen or Artist. Each programming language / coding environment is a different toolbox, because basically the CPU has it's own set of functions.
The tools You learn to use are decided by the resources or materials You're working on. Just like an Artist - If they are a sculptor, they use certain tools to metal sculpt, other ones to wood sculpt, & still other ones to clay or rock sculpt.
Just like each type of Tradesmen uses a different set of tools also. You'll rarely find a matching set of tools other than a few basic power items in the toolbox of a Plumber / Gasfitter that You would in the toolbox of a Framing Carpenter.
However, both of those trades use an amount of math, but it doesn't decide they're fate in their trades as the only factor.
There are MANY highly-skilled Craftsmen who can actually eye up or re-cut their materials until they fit perfectly without using a ruler or guide.