Typically, when learning a new language grammar is learned first. Once you learn where words go in the structure of the language, you can then start learning which words to place within that structure.