To start you need to learn how the code works. But about the code you must first make a very deliberate decision:
* Do you want to learn this for yourself?
* Or, are you looking for employment?
If the goal is employment then if you have a Java background learn Angular, otherwise learn React. They are massive frameworks, so its really just a matter of using the world's largest tools to put text on screen. Watch videos online. Be prepared for a lot of boring instruction that feels like copy/paste.
If the goal is to learn this just for your own personal use then don't even bother with the framework nonsense. Its an inch deep just to people under-qualified people into the workforce and will become all consuming. Instead learn the event model for interaction, accessibility for how to write the markup, CSS how to make it pretty, and the DOM for how all this works together. Its more complicated than it sounds to get started, but once you achieve the smallest level of comfort its astonishingly faster to learn than the framework nonsense, because the framework nonsense is much larger than the things it layers over.