I disagree with the other answer by @user10239 in that I think you can dive right into listening comprehension immediately, and I would strongly recommend doing so. There is no need to wait 3-4 years, and I would argue that doing so is actually inefficient and even dangerous, i.e. making it so that you develop a lot of bad habits that you will spend years having to "unlearn".
I have seen so many students who pour 3-4 years of classroom learning into German or another language, and yet have barely any speaking or listening comprehension in real-world settings. In many senses, they haven't even been learning real German, they've been learning an artificial classroom representation of it, and as such they struggle to connect their "book learning" with actual real-world usage.
There are several different mental skills that you need to develop in order to be able to understand spoken German with ease.
The first is for your brain to process the phonology of the language, i.e. you need to hear the basic building blocks or phonemes, including vowels and consonants.
German has considerable overlap with English, but there are important differences. The hardest vowel sounds to most speakers of standard American English are the long and short ö
and the long and short ü
. Most of the other vowels are close enough to English vowels that you will usually hear them as distinct without much additional effort. Because English does not have ö
or ü
, however, your brain may initially "gloss over" these vowels, instead perceiving them as the same as o
and u
, or perhaps occasionally mishearing them as other vowels in some contexts.
In terms of consonants, the hardest ones for most English speakers are the two ch
sounds (there are two subtly different ones, summed up in the sentence "Ich auch.", the ch
in "ich" is more in the front of the mouth whereas in "auch" it is farther back) and the r
. Keep in mind there are two separate r
sounds in German, the "swallowed" one at the end of words, like "der", and the clearly-pronounced one, in words like "rot". Germans also have several different ways of pronouncing the r
, which vary regionally, so you need to make sure you are perceiving all of them. Lastly, one more sound I'd focus on is the soft g
on the end of words.
Other sounds are unique to German, but usually English speakers have little trouble with them, such as Pf
as in "Pferde".
I have found that practicing my pronunciation, by playing German words over and over again, pronounced by native speakers, listening closely to them, and trying to match them, helps a lot. The listening is the key here. Forvo is your friend; you can look up any word on it.
Why is mastering the phonology so important? A lot of the "inaccuracies" of mishearing sounds are things where you can get away with a poor match if you're listening to someone speaking slowly, clearly, and loudly. But make someone start talking quickly, quietly, in a regional accent, or introduce background noise into the scenario, and it becomes more difficult, and your chance of listening errors (either mishearing words, or just not knowing what you're hearing) increases hugely.
When you've mastered the basics of the phonology of the language, good enough that you hear the phonemes accurately when the language is spoken quickly, it will be much easier for you to start connecting your "book learning" of vocabulary and grammar with things you hear real native speakers saying, whether in actual conversations with them, or just in watching videos or listening to audio in the language. And you'll find that you have better "error correction", like you can better process fast speech, understand a wider range of regional accents, and even hear someone in a noisy room.
Once you've gotten to this point, the way to get better is just exposure, time, and effort. Watch videos that you're interested in. Try to converse face-to-face with native speakers as much as possible. If you can't do it in-person, find a language partner. Tons of Germans want to learn English and Germany is well-connected online, and relatively few English speakers learn German, so it's pretty easy to find partners even though there are fewer German speakers globally than English speakers.
Over time you can work on vocabulary, grammar, word choice, and all of the other "higher-level" structural aspects of a language. I find that a solid mastery of the phonology makes it much easier to pursue all of these things, mainly because it becomes easier to connect "book knowledge" that you can get from a classroom, from tools like Duolingo, Lingvist, or Clozemaster, or from online tutorials or articles, with real-world listening comprehension (and hopefully, speaking ability.)