Also in my experience, reading text eventually is the most efficient way to learn a language, including the grammatical pecularities. If you come upon the phrase "das kalte Bier", you know that it is "das Bier".
At the beginning of learning a language, reading texts is too slow. In that phase, memorizing and practicing vocabulary or short translations (like Duolingo, which I can wholeheartedly recommend) are a good start.
In my experience, especially from learning English, it's a good idea to not look up every unknown word when reading. You quickly develop a sense of which words or grammatical concepts are important for the meaning of a sentence. If you see a new word in different contexts a few times, you may get curious enough to look it up. Or you already have a sense of its meaning.