The short answer
Non-alcoholic beer is made in two ways. Either the brewery prevents much alcohol from forming in the first place, or it removes the alcohol from the finished beer afterward. The chosen method shapes the flavor. And there's by no means just one style here.

Two fundamental approaches
The first approach prevents much alcohol from forming in the first place. The brewery stops fermentation early. Or it works with special yeasts that produce hardly any alcohol. Fermentation here refers to the process by which yeast produces alcohol.
The second approach starts with a completely normal beer. Only afterward is the alcohol removed again. This happens through vacuum evaporation or via membranes, for example. A membrane is a very fine filter.
Both approaches leave traces in the glass. Early-stopped fermentation often leaves behind residual sweetness and a spicy grain note. That's exactly the taste many people associate with older alcohol-free beers. Removing alcohol afterward, on the other hand, costs aroma, since aromas disappear along with the alcohol.
Which approach a brewery has chosen rarely appears on the label. Still, it shapes the result. What this means for you: two alcohol-free beers can differ more from each other than two regular ones. Fermentation management, yeast, and extraction method open up very different styles. Sweet and flat is therefore no longer the rule. Hop-forward and roasty versions exist too.
Choosing the beer style as well
Don't just look for "an alcohol-free beer." Look for the style you'd normally drink anyway. If you like a bitter pilsner, start with an alcohol-free version described the same way. If fruity hop aroma interests you, a different direction will lead you further.
Also ask for the specific alcohol content if it matters to you. "Alcohol-free" is a label, not a number. The number is on the bottle.
Compare small, well-chilled samples in a glass. Note down three things: sweetness, bitterness, and mouthfeel. You don't need more than that, and less won't tell you enough. Also pay attention to the storage instructions on the bottle after opening.
With food, what matters is what's in the glass next to the plate. An alcohol-free beer doesn't have to compete against its alcoholic sister brand. It's allowed to be the better choice for your evening independent of that. Constantly comparing it to the original usually just leads to disappointment.
One last note for all the skeptics. Anyone who last tried alcohol-free beer ten years ago doesn't know today's market. There are now alcohol-free IPAs, meaning hop-forward beers, plus wheat beers and sour beers. Quality has clearly improved for many of them. A bad impression from back then says little about today.
