HTML is markup (knowing the basic parts of a car).
CSS is style (painting the car).
JS is behavior (driving the car).
This is to be expected, especially if you're new to coding in general. Back when I started learning web dev as a teenager, JS was what tripped me up and made me lose motivation. It's only now, having learned a decent amount about how computers work and a little of various other programming languages, that I can finally get my head around it.
Another thing that helped is that now jQuery exists. Are you focusing on jQuery or pure JS? I found that jQuery allowed me to get a better understanding of JS at a coarser grained level, which then helped a lot once I wanted to go back to basics with pure JS.
If you're already using jQuery and struggling with it, a good place to start is the official jQuery documentation itself. Try out a few experiments with something simple (click this button to make another element disappear. Then change your code so the button makes the element red instead. Then change the code again so it toggles the color between red and blue. Then make the animation slower. Then make it change the text of the element... Etc.)