Star anise is used in culinary applications for its distinct flavor but is also employed for its medicinal benefits. Star anise is a pillar ingredient in Chinese cooking; it is one of the main flavors in Chinese five-spice powder and is also used to make tea and season roast duck and other meats. In Vietnamese cuisine, star anise is part of the well-known soup, pho. In Western cultures, it is more often used to flavor liqueurs, such as absinthe, sambuca, and pastis, as well as baked goods like cookies and cakes.
Source: What Is Star Anise and How Is It Used? (thespruceeats.com)