When you start learn new programming languages, frameworks or technologies. You are likely to start some heavy googling session about this exact subject. A lot of information start going through our head. From the Hello world exercise to the async methods, passing by optimization and best practices.
Quickly, if you are not prudent enough. You will start to find catchy articles from Medium, Reddit or Dev.to (Hello !). Saying to you what you should absolutely do, and don't do. Sweet! The guys writing that is so kind, he knows probably more than you and want to help you save time and effort from something he encountered before you... Bim! You fell into a false pitfall.
It's difficult to be an expert, it requires years of practices, you need to be able to explain to anyone anything in your particular area. You will quickly see if you try to do so, that you really don't know why you are doing this that way for so many years.
But it's really simple to have a misconception about a particular subject. I have a great example from something outside the programming area that happened to me. When I was a Game Art student we had to make a full game for the last year graduation project. We were in groups of 2 to 5 students. I was in charge of the 3D modeling of the game scene.
In 3D, after you did your High-polygon-full-of-details model (of a tree for example), you then need to make a lower version of the same model for real time computing (or your game will end up with 3 frames-per-seconds). There are several techniques and workflow for this. But I personally choose the one that require to me the less effort and time to finish this task. With my technique, my Lowpoly model is finished in 7 minutes. A good score.
But, not even 3 days after I started my 3D model production with this method. One student of my group saw the Topology of one of my lowpoly 3D models, his hair stood on end. He told me that's not how we do 3D re-topology, that what I did will break inside the engine, everything will go wrong and our game will explode at our faces (I am not really exaggerating).
For them, the good technique was to do by hand the whole Lowpoly model version over the Highpoly one instead of using my procedural technique, extending the process by 3 hours instead of 7 minutes. And of course, my technique did not break anything in the game. They just don't know what they were talking about.
A lot of people are claiming to know more efficient and vital process. But in fact, it will cost you time to learn that new technique and more time again to get it worked compared to your simple old technique.
When I started learning NodeJS, One of the first articles I read on medium was about the Callback hell.
Callback hell is when your code goes into a great amount of sub loops/if/callbacks (so not something limited to callbacks). You will see this strange weave in your code. This issue also have its own website. Pretty serious right ?
I learned afterward that callback hell is not something really problematic. Yes sometimes you will get lost if your script is pretty large and badly named. But you will start to quickly realize that simple well named function will resolve it. You didn't need to think heavily about it. You didn't loos much time fixing this. And it wasn't an issue worth to worry for a beginner. But it sure was a great false pitfall.
A good example is the ExpressJS and KOA routing solution for Nodejs. Koa is more recent and is written by some guys beind ExpressJS. I talked to some peoples that consider KOA better than express (smaller, more expressive, and more robust foundation for web applications and APIs, no matter what these adjectives really mean for your code) In fact, ExpressJS is 27 times more downloaded that KOA. You will find more content for ExpressJS, so you should probably use Express in a first place instead of KOA.
Okay, I will maybe grind the gear of some peoples. But when it comes to Client-Side interface. You will quickly have a bunch of peoples yelling at you that you should use React, Angular, VueJS, Ember and so on...
These Front-End frameworks was created to standardize the development of application. When you have multiple developers in your team and they all use different architectures and ways to develop an application, it will quickly get very, very messy. Having a strict framework can you help to have a more robust code.
The fact is, for most application, you don't really need all of this heavy gear and limitations. A simple vanilla routing and a little of Jquery can make the job correctly.
Building fences all around you to avoid bad code doesn't really protect you against it.
If these peoples are talking about something you should do, that can or will be problematic someday. It's probably for a good reason.
But never jump straight into it. Ask yourself before if you really need to follow this advice? If the guy that is telling you this can't really construct an argumentation, it's probably a bad idea to listen to only him. Try to google a little about the subject. Also prefer most popular and well documented solution first. But don't feel bad to not doing things 100% correctly when learning a programming language. You will learn faster if you do the error first and then find yourself that something seems wrong.