Just working on this graphic, showing the relationship between wine flavour chemistry and the perception of wine.
Flavour chemicals come directly from grape must, from bacteria and yeasts directly, and also from bacteria and yeasts modifying precursors in the must. There’s also the possibility that some elements of flavour could come from the soils, although this is debated, and any soil effect is likely to be indirect. Oak barrels also impart flavour, as would grape juice concentrate if this were added, or tartaric acid.
But then a lot of hidden processing is taking place in our brains before we are aware of flavour. For example, the colour of the wine affects our perception. And we bring our learning and past experience into play, without even realising it. Flavour perception is not simple: it is not like a chemical readout from a measuring device.