Ah! This question which offends as many people as it pleases (because it is a correct question).
Some people in academia are actually trying to solve this issue. You may look at:
1. How to Design Programs : https://htdp.org/
2. Data-Centric Introduction to Computing: https://dcic-world.org/
3. A course based on the above book: https://learnaifromscratch.github.io/software.html