Preheat the oven to 375°F (190°C).
Don’t skip this. Cold ovens are casseroles’ worst enemy. Lightly grease your baking dish and set it aside.
Prep the green beans.
Trim the ends and blanch them in salted boiling water for about 4–5 minutes. You want them tender but still holding their shape. Drain and set aside.
Sauté the aromatics.
Melt butter in a large skillet over medium heat. Add diced onion and cook until soft and lightly golden. Toss in the garlic and cook for 30 seconds—just until fragrant.
Cook the mushrooms.
Add mushrooms to the skillet and cook until they release moisture and turn golden. This step builds flavor, so don’t rush it.
Make the mushroom gravy.
Sprinkle flour over the mushroom mixture and stir for about a minute. Slowly add broth while stirring constantly, then pour in the milk or cream. Let it simmer until thick and glossy.
Season like you mean it.
Add salt, pepper, and a splash of soy or Worcestershire sauce. Taste. Adjust. Taste again. This is your moment.
Combine everything.
Fold the green beans into the mushroom gravy until well coated. Pour the mixture into your prepared baking dish.
Top and bake.
Sprinkle crispy fried onions on top if using. Bake uncovered for 25–30 minutes, until bubbly and lightly golden.
Rest and serve.
Let it sit for 5 minutes before serving so the sauce sets. Then dig in like you earned it—because you did.