How do I choose the right dog food?

Okay, here’s the expanded question:How do I choose the right dog food, considering my dog’s age (they’re a 7-year-old medium-sized breed), activity level (moderately active, enjoys a daily walk and some playtime), known sensitivities (slightly sensitive stomach, occasional gas), and…