Brewing espresso is one of the most complex endeavors in coffee. Everything bears on the outcome, from the selection of beans and their age, to minute changes in how they're ground, to variations in humidity, to the packing and tamping of the portafilter, the weight and volume of coffee used and the size of the basket, the temperature of the group heads, the amount of time spent extracting, and so many other aspects of the process.
All of that said, most espressos wind up as milk drinks, in which the outcome of the extraction process in the actual espresso shot(s) is often hidden from the palate.
The general rule of thumb is simple: finer grind = over extraction = bitter; coarser grind = under extraction = sour. But there's a complicated catch: because the flow of water bears on extraction time and quality, you sometimes need to adjust in the opposite direction your taste buds tell you, and vary the packing, tamping, or amount of grounds. Yeah, I told you it was complex.
In 90% of cafes, grinds are dialed in daily, and baristas aren't necessarily able to taste and recalibrate during the day. It's just a process. The best baristas, in my experience, are the ones who commonly watch a pull and then
throw it away, followed by a tweak. Crazy.
Long answer short: grab a nickel and have a gander at a
coffee grind chart. And as you tweak, take the smallest steps you can in modifying the grind.