Hello,
"La viande" is a generic word used when we talk about the flesh of an animal that is going to be eaten. "De la" in front of "viande" because it is a feminine gender noun.
The meat is not as countable as Vegetables (there are so many varieties of vegetables but for meat there are mainly two different kinds: red meat (for beef veal pork lamb) and white meat (for chicken)... (and also black meat for game like deer).
It s the same for bread, we say "du pain" and not "des pains" because it s a generic and general word used for that food. It s not countable. The same for milk too: "du lait", not "des laits".
But careful because we say "des pains au chocolat" and not "du pain au chocolat", because in that example we talk about a specific kind of french pastry (which may be countable).
In conclusion I think there is a kind of countable reason for the use of these prepositions but sometimes there is no particular reason (or if there is one, most of french people are not aware of), I guess there are some exceptions too. So I d say that the most effective way would be to pratice repeat listen to them a lot of time and at the end you ll know which preposition to use, just because it sounds good.
Break a leg!