Melt butter in a large skillet or Dutch oven over medium heat. Add onions and salt, cook for 20-25 minutes stirring occasionally until deeply caramelized and golden brown.
Add minced garlic and cook for 1 minute until fragrant.
If using white wine, pour into pan to deglaze, scraping up browned bits. Cook for 2-3 minutes until wine mostly evaporates.
Add beef broth, Worcestershire sauce, and thyme. Stir well and bring to a simmer.
Add uncooked pasta to skillet, stir to submerge. Cook according to package directions (10-12 minutes) stirring occasionally until al dente.
Reduce heat to low and stir in heavy cream, Gruyère, and Parmesan. Stir continuously until cheese melts and sauce is creamy, about 2-3 minutes.
Season with additional salt and pepper to taste.
Garnish with fresh thyme before serving hot.
Notes
Patient caramelization develops deep flavor – don’t rush this step.
Swiss cheese substitutes well for Gruyère if needed.
For vegetarian version, use vegetable broth and omit or use vegetarian Worcestershire sauce.