Cargo cult programming means copy and pasting code from examples and tutorials, often with a false or without deeper understanding of the code copied.
The first remedy against that is to understand the stuff you have been copying. That alone elevates you from cargo cult programmer to a copy and paste programmer. Now you need to understand why copy and pasting is a bad way to program and how to structure your code so it is better.
This is a totally different thing from learning nifty algorithms of people being far cleverer than you are. As someone else already said, you can go a complete programming career with happy coworkers and customers and never really go deep into algorithms. Learning and practicing good software engineering practice will help you more than abstract CS concepts.
The first remedy against that is to understand the stuff you have been copying. That alone elevates you from cargo cult programmer to a copy and paste programmer. Now you need to understand why copy and pasting is a bad way to program and how to structure your code so it is better.
This is a totally different thing from learning nifty algorithms of people being far cleverer than you are. As someone else already said, you can go a complete programming career with happy coworkers and customers and never really go deep into algorithms. Learning and practicing good software engineering practice will help you more than abstract CS concepts.