The thing with learning to program is ultimately solving problems by using tools to build code that then “solve the problem”.
There is a distinction that isn’t immediately clear between solutions, and the tools used to make solutions, and the sort of problems you are aiming to solve.
It’s one thing if your problem is a typo in your class
attribute so your CSS class doesn’t work, but from an end user perspective the problem is “your page is ugly”. It just so happens the “tool” being mis-used is css.
So for your “problem” of an HTML form to “process data”, the “tools” you have available are HTML and JavaScript (CSS isn’t important for this, but could be used to make things look nicer).
Within each of HTML and JavaScript you could use more “tools” which would be syntax of HTML to create a form, add validation, etc. And JavaScript to manage the DOM (the name of the “JS” representation of the HTML on the page) to dynamically do what you want.
The “solution” you build will be made up of HTML working with your JavaScript code to solve the “problem” of “processing data” on the page.
Hence this entire process isn’t so much trying to find a tool that by and large solves the problem, it’s building something using the tools you have to “solve” the problem. This is programming at its core, where the language is the “tool”, but you have to use it correctly to build stuff to solve problems.
A big difficulty is knowing what you’re searching for. To help with that you need to understand the problem(s) you’re actually solving for and the general tools you’d use to solve for it. From there you can then search for more specific help/information on using those tools correctly.
Part of this is understanding the problem space, and general context to what your doing overall, along with having context into what you don’t know.
This is where generally randomly learning/reading about random stuff can help expand your knowledge horizon. The goal being to get some context, and learn more about stuff you don’t know so you can get an idea of what you can learn more of.
As you know it’s a lot, but you don’t want/need to be an expert just be aware.
A good resource to just go through randomly would be MDN:
Your right the best way to learn something is to use it, however you can’t learn everything you don’t know about without other methods. Otherwise you could easily become an “expert” in only part of a solution and miss-out on the bigger picture. So do read up on more broad strokes as well as focus on learning the smaller ones.
Good luck, keep learning keep growing 