The Four Pillars: Variables, Conditionals, Loops, Functions
Almost every program, from a pocket calculator to a large application, is assembled from the same four ingredients. Variables hold values. Conditionals let a program choose a path; Python spells the branches if, elif and else, while JavaScript writes them as if, else if and else. Loops written with for and while repeat a set of instructions. Functions, defined with def in Python and with function or an arrow function in JavaScript, package a piece of logic so it can be called again.
These four tend to feel easy on the page and hard in practice, mostly because real programs need them at the same time. Checking whether a number is odd or even uses a variable and a conditional. Printing 1 to 10 uses a loop. Combine the two inside a function that prints only the even numbers between 1 and 50, and the way the pillars hold each other up suddenly becomes visible.
A simple routine works well here. For each pillar, write at least three small examples of your own, then try to explain how they work in plain words. If the explanation flows without notes, the idea has stuck. If it stalls, go back to the examples and change the values until the pattern shows itself. Frameworks and advanced libraries can wait until all four pillars feel natural.
Until you can explain variables, conditionals, loops and functions in your own words, hold off on frameworks.