In a large pot or dutch oven, melt butter over medium heat then add onions. Sauté until onions are soft, golden brown, and caramelized for approximately 20-30 minutes.
Stir in garlic, thyme sprigs, bay leaf, salt, and pepper. Cook for 5 minutes.
Add white and red wines then bring to a boil. Reduce heat, remove thyme sprigs and bay leaf then add in beef stock. Bring to a simmer and cook for another 10 minutes. Re-season with salt and pepper, if necessary.
Preheat broiler. Place oven-safe ramekins or cast iron cocottes in a sheet pan. Ladle soup into each one then top with a slice of thick crusty bread and grated cheese. Place under broiler on high for about 2-3 minutes until cheese is melted.
Alternatively, you can broil the crusty bread slices with olive oil, separately, on a sheet pan for 2-3 minutes until crispy then serve with the soup. Serve and enjoy!