Flavors come from your sense of taste reacting to a molecule. Food scientists do a crapton of work to figure out which molecules cause which tastes, then figure out how to create those molecules synthetically and how to mix them to end up with the right flavor.
For example, artificial cinnamon flavor is cinnamic aldehyde + eugenol + a touch of methyl cinnamate + a few other things. You could probably get away with just cinnamic aldehyde.
Likewise, artificial vanilla flavor could be as simple as just 4-Hydroxy-3-methoxybenzaldehyde aka vanillin.
Latest Answers