Caramelize onions: Melt butter in Dutch oven over medium heat, add sliced onions and cook 25-30 minutes until golden brown and caramelized perfectly.
Add aromatics: Stir in minced garlic and fresh thyme, cooking for 1 minute until fragrant and the kitchen smells absolutely incredible.
Deglaze pot: Pour in white wine if using, scraping up browned bits, then add beef broth and bring mixture to gentle boil.
Cook pasta: Add pasta directly to pot, stirring frequently and cooking according to package directions until tender but still firm.
Make sauce: Stir in heavy cream and simmer 2-3 minutes until sauce thickens slightly and coats pasta with creamy goodness.
Finish dish: Remove from heat, add grated Gruyere cheese, stirring until melted, then season with salt and pepper to taste perfectly.