Peel and thinly slice the yellow onions into uniform half-moons.
In a large pot over medium heat, melt the ghee and add the onions with sea salt.
Cook the onions for 25-30 minutes, stirring occasionally, until they reach a deep, jammy golden brown consistency.
Stir in the minced garlic and fresh thyme, cooking for another 2 minutes until fragrant.
Pour in the balsamic vinegar to deglaze the bottom of the pot, scraping up any flavorful browned bits.
Add the beef bone broth and black pepper, then bring the liquid to a gentle simmer for 15 minutes.
While the soup simmers, lightly toast the sourdough slice until crisp.
Ladle the hot soup into an oven-safe bowl, place the toasted bread on top, and cover with the shredded Gruyère cheese.
Place the bowl under a broiler for 2-3 minutes until the cheese is melted, golden, and bubbling.