Learn the 6 Russian cases in all forms (masculine, feminine, neuter and plural), only then memorize new words. It may take time to recognize the same word in different cases at the beginning, but once you get the hang of the cases, it shouldn't be a problem. In other words, it's more useful to memorize words after you picked up a bit of grammar.