01 - Preheat oven to 375°F. Lightly grease a 9x13-inch baking dish with butter or cooking spray.
02 - Bring a large pot of salted water to a boil. Add green beans and cook for 5 minutes until just tender. Drain immediately and transfer to ice water to halt cooking. Drain again and set aside.
03 - In a large skillet over medium heat, melt butter. Add chopped onion and cook 3 minutes until softened. Add garlic and mushrooms; sauté 5 to 6 minutes until mushrooms are golden and tender.
04 - Sprinkle flour evenly over vegetables and stir constantly for 1 minute to remove raw flour taste.
05 - Gradually whisk in milk, broth, and cream. Add salt, pepper, and nutmeg. Bring to a simmer and cook, stirring frequently, until sauce thickens about 5 minutes.
06 - Add blanched green beans to the skillet, folding gently to coat evenly with sauce.
07 - Transfer mixture to prepared baking dish and spread evenly. Top with crispy fried onions in a uniform layer.
08 - Bake uncovered for 20 minutes until sauce bubbles around edges and topping turns golden brown.
09 - Let casserole rest 5 minutes before serving to allow sauce to set slightly.