German cases have to be learned by listening to others, as your post kind of alludes to but may not be obvious to people, is that the gender assignment is not intuitive and too much of a sentence relies on knowing the gender assignment of a noun.
Fortunately, in a conversation you can listen to which suffixes people use, to reverse engineer the gender assignment of the noun. You have to store the experience in your mental hashmap and always assign the noun that way. The classical conditioning comes when people look at you ridiculously and disagree with your sentence structure, you'll re-evaluate quickly to avoid that.