Based on my experience as a programmer, I recommend you to understand the data structures concepts first before learning programming languages like Python and Java. In solving a problem, first, create a flow chart on how to solve the problem. Also, learning writing dynamic programming. It is very important to understand the concepts of space complexity, time complexity. Keep practicing programming on your own first and after that compare your code with better solutions on the web. Participate in competitions regularly. Submit your solutions and keep a watch on the leaderboard and improve yourself.
Also, watch this video to learn how to improve Programming skills: