Begin the magic by caramelizing the onions.
In a large, deep pot or Dutch oven, heat the olive oil or melt the butter over medium heat.
Add the sliced onions and cook, stirring occasionally, until they are deeply soft, sweet, and golden brown. This is the most important step, so be patient—it will take 30 to 45 minutes.
Don't rush the process! 2. Build the flavor.
Add the thyme, bay leaf, the halved head of garlic, and a generous pinch of salt and pepper.
Stir for about a minute until fragrant.
Pour in the vegetable stock and the optional cognac.
Bring the soup to a boil, then reduce the heat to a gentle simmer.
Let it cook for at least 15 minutes to allow the flavors to meld together beautifully. 3.
Finish and serve.
Before serving, remove and discard the bay leaf and the papery garlic skins (you can squeeze the softened cloves back into the soup if you like!) Ladle the hot soup into bowls, garnish with fresh parsley, and serve immediately.