I feel you first need to learn how to be competent, then you need to learn how to be incompetent. By that I mean recognize your areas of deficiency, know how and when to ask for external support without being ashamed about it (being competent _somewhere_ helps with that). I don't know if this is meta-cognition, wisdom, or something else.
While you're still struggling on the first step it's easy to get tripped on the second one.
My recommendation to younger people starting out is to aim to become a "T Shaped Person"[0], or even better "F", or "π" shaped. The idea being to have a very wide range of shallow knowledge, enough to communicate, understand, spot the BS, and make a start. But have a very deep area of expertise in one, or ideally a few, core areas relevant to your chosen field.
Personally I find HN an invaluable resource to ensure that I have a very board, but shallow(ish), understanding of a large number of interesting things. I've been here for 14 years and it's probably been one of the most valuable experience I have had.