MDN is pretty much the best reference site that could possibly exist for JavaScript and web development, so get familiar with it and use that as needed. They have some beginners tutorials which are nice if you just want to get a peak and practice at certain topics. They have a full curriculum for learning web development that I'm sure is good but I haven't looked closely at.
Generally, I think The Odin Project is the best full curriculum for learning web development from zero knowledge to proficient. Like any other resource, it won't resonate with everyone, but it's worth a look if that's what you're after.
Step 3: Google why things happen that you don’t understand or how to make things happen you want
Optional steps 4&5: call yourself a senior dev and profit.
Seriously though, you’ve given no context to your question. Are you already a seasoned Haskell purist but can’t wrap your head around the monstrosity that is JS? Are you wondering how websites work? Do you have no idea what programming is but heard you can ‘do cool stuff if you know js’?
Good luck though, JS is the acid trip of (serious) programming languages. It’s fun though!