If we ask the average consumer, they would say there are three different types of wine glasses. The large ones for red wine, smaller ones for white wine, and the narrow long glasses for sparkling wines. And while this is largely true, there's a little more nuance to it.
All traditional wineglasses are designed to have a stem. Not because this really impacts the flavor, but to keep the wine at the right temperature when holding the glass. The shape of the bowl, however, does impact our experience of flavor. The way we hold our head when drinking, the depth of the nose inside the glass, the curvature of the glass as it slopes upwards can all change the way we smell and taste different types of wine.
Let's talk about red wine glasses for example. Traditionally, red wines are served in a glass that has a wider and larger bowl. This because it promotes more oxidation which generally suits red wines better as it brings out the complexities of the wine. Even within the red wine glass category, there are different shapes. Glasses used for Bordeaux are generally designed to direct wine towards the back of the mouth, while glasses used for Burgundy are broader and aim to hit the front of the mouth. As the tongue has different receptors for different types of flavor profiles, the goal is to optimize where the alcohol will hit the mouth.
Other than size and shape, the size of the opening of the glass can also play a factor. A glass that has an opening that is too narrow can hide a lot of the aromas from a wine. Additionally, a sparkling wine glass is shaped the way it is in order to preserve the carbonation in the glass as long as possible, and it's opening is slated inwards for the same purpose.
To give you an overview, the below info-graphic shows a good range of wine glasses.

As an additional example, below you can see the variety of glassware available for beer.

Sources:
https://www.forbes.com/sites/tmullen/2016/08/25/why-the-shape-of-a-glass-shapes-the-taste-of-your-wine/#546fbae26554
https://winefolly.com/tutorial/the-importance-of-a-proper-wine-glass/
https://www.homestratosphere.com/types-of-beer-glasses/