Hello welcome to the forums , hope it helps and supports you on your journey
I want to start off with bringing up a distinction, HTML and CSS are not programming languages. Consider HTML as as an extension for words, in that you markup your words to describe it better (to a browser). CSS is used to describe how things look, so its in a similar boat. You can consider both as just syntax, where memorizing how the syntax works is more or less all you have to do.
I wanted to bring up this distinction because JavaScript (the next thing to learn after HTML/CSS for front-end web development) is a programming language. As the same as before, learning the syntax is something you will need to do but, you also need to learn to program with the language. This is where you learn concepts that are easily transferable to other languages comes up. For example, learning about data structures and algorithms using JavaScript is easily transferable to other languages once you understand the syntax of the new language.
So if your concerned with learning other languages down the line, continue your web development journey and learn JavaScript. JS will allow you to make your web pages dynamic, and then some.
The best way to “learn” is to practice. If you read about how to do X, you wont 100% remember this forever unless you use it a number of times, and learn about how it can be used in a number of cases. The easiest way to gain this experience is to go out and build stuff. This goes for learning basically anything. The more you practice, the more knowledge gets transferred to “muscle memory”.
For syntax and API problems, looking at a reference usually helps you get over the “what does that do?”. When you need help on doing X, being able to get answers usually relies just on straight google-fu, AKA phrasing your question correctly to get the most relevant answers.
One of the best references out there for web development is MDN it has tons of resources on web apis, references, tutorials, guides, and everything in between. For higher-level overviews FreeCodeCamp guides is another good one for situations where you go “what is that technology” or similar.
Finally, if you like web development and game development, why not build a game using web technologies? I recommend looking into something like phaser which is a JavaScript powered game engine. Its great for simple 2D games, and very accessible since all you need is a web browser to run it(!)
Good luck, keep building, and don’t worry if you forget stuff or need help, its all part of the learning experience