01 - Bring a large pot of salted water to a rolling boil. Cook the pasta according to package directions until al dente. During the final 3 minutes of cooking, add the green beans to the boiling water. Drain the pasta and green beans thoroughly and set aside.
02 - Melt the unsalted butter in a large skillet or Dutch oven over medium heat. Add the finely chopped yellow onion and sauté for 2-3 minutes until softened. Stir in the minced garlic and sliced mushrooms, and cook for an additional 5-6 minutes, or until the mushrooms are well-browned and tender.
03 - Sprinkle the all-purpose flour evenly over the sautéed vegetables. Continuously stir and cook for 1-2 minutes to form a smooth roux.
04 - Gradually whisk in the whole milk and vegetable broth, ensuring a smooth consistency. Bring the mixture to a gentle simmer and continue to cook for 3-4 minutes, or until it has slightly thickened.
05 - Reduce the heat to low. Stir in the sour cream, dried thyme, ground black pepper, salt, and ground nutmeg. Taste and adjust seasonings as necessary.
06 - Add the drained pasta and green beans to the sauce. Mix thoroughly to ensure everything is well-coated. If the mixture appears too thick, add a small splash of milk to reach the desired consistency.
07 - Preheat your broiler or oven to 425°F (220°C).
08 - Transfer the combined pasta mixture into a lightly greased 9x13-inch baking dish. Evenly sprinkle the grated Parmesan cheese (if using) and the crispy fried onions over the top.
09 - Broil or bake for 3-5 minutes, or until the topping is golden brown and delightfully crispy. Serve the dish hot.