The short answer
Sherry isn't inherently sweet. Behind the name lies a Spanish wine category with very dry and very sweet styles. They differ in base wine, in aging, and sometimes in a later sweetening. That's why the exact style designation matters.

Fino and Manzanilla: dry and shaped by flor
Flor is a living yeast layer. It forms in the barrel on top of the wine and shields it from oxygen. In doing so, it consumes alcohol and residual sugar. This type of aging is called biological. It gives the wine its typical yeasty-salty note.
Fino is made this way. So is Manzanilla, though it has its own protected origin. Both styles taste dry, delicate and distinctive.
Serve them well chilled. Also, don't treat an opened bottle like a spirit that can sit in the cupboard for months. This is wine.
When the flor layer dies off, oxygen reaches the wine. Then oxidative aging begins, meaning aging with air contact. It's exactly this transition that leads to the next style.
Amontillado, Oloroso and Palo Cortado
Amontillado combines both paths. It first ages under flor and then oxidatively. That's why it tastes neither like a Fino nor like a pure Oloroso.
Oloroso ages oxidatively from the start. It comes across as more powerful and often shows nutty or spicy notes. Palo Cortado is yet another distinct style designation.
One point applies to all three: darker color doesn't mean more sugar here. These wines are dry. The color comes from the air in the barrel, not from sweetness.
The names sound complicated, but they only describe the aging path. Remember above all two directions. Flor means fresh and salty. Air means nutty and powerful. With that, you can already classify a large part of the labels.

Cream and Pedro Ximénez
Sweet Sherry styles have a different role than Fino or dry Oloroso. Pedro Ximénez comes across as very concentrated and sweet. Cream combines a different aging process with a sweetening.
Pedro Ximénez is also the name of a grape variety. The grapes dry in the sun before pressing. The berry loses water in the process, while the sugar remains. The result is thick, almost black and very sweet. Many people pour it over ice for this reason.
When buying, the precise style designation counts. Asking for a bottle of Sherry is about as precise as asking for a bottle of wine. Say whether you want it dry or sweet. This one piece of information will spare you most disappointments.
With food and in cocktails
A dry style pairs with savory dishes, a sweet one more with dessert. Try it with the specific dish and start with small amounts. The plate decides more reliably than any list.
A Fino belongs chilled in the glass and should be treated like a white wine. Many people lack exactly this expectation. That's the most common reason for Sherry's poor reputation in Germany: for decades it was served warm and in its sweet variant.
After opening, Fino also behaves like a white wine. Drink it within a few days. Oloroso and the sweet styles are more robust, since they've already undergone oxygen contact.
In a Sherry Cobbler, the wine itself is the base of the cocktail. If you swap a dry for a sweet Sherry there, the sugar balance shifts considerably. So the recipe means a specific style.