Coding is a skill that requires a lot of practice. Most people think coding is a matter of learning syntax and applying it. This is true in the same way that learning a language is like learning grammar.
Fundamentally, coding is a problem solving skill. It is more akin to mathematics than language. There are specific problems that need to be solved, and coding allows you to solve those problems. It is most important to learn fundamental concepts, like loops and branches, and not learn one specific language.
That being said, I recommend learning programming in C and Python for a good introductory language. C is close to the computer, and that allows you to see closer to what's happening "behind the scenes". To really see what's happening behind the scenes, it could be educationally beneficial to take a computer architecture class and learn assembly language.
Next, it is a good idea to learn Java. This is an object oriented programming language, which means that everything is represented as an object. Essentially, you can design an ant that looks a certain way (has fields) and behaves a certain way (has methods).
The best way to learn programming is twofold: master the fundamental concepts, and apply them to challenging problems. For example, try building a game of Snake or Battleship. Try creating a social simulation.
Even better, try contributing to Minds. They will give you tokens for your contributions.