Prep the oven and dish: Heat oven to 350°F (175°C).
Lightly butter a 9x13-inch baking dish or similar casserole dish.
Cook the green beans: Fresh: Trim and cut into 1 1/2-inch pieces. Blanch in salted boiling water 4–5 minutes until crisp-tender. Drain and rinse under cold water.
Frozen: Thaw and pat dry, or simmer 2–3 minutes to warm slightly.
Drain well.
Canned: Drain thoroughly and pat dry for best texture.
Mix the sauce: In a large bowl, whisk cream of mushroom soup with milk until smooth. Add soy sauce or Worcestershire, black pepper, and garlic powder. Stir in cheese if using.
Combine: Fold the green beans into the sauce until evenly coated.
Stir in about 1/2 cup crispy fried onions for extra texture.
Assemble: Spread the mixture into the prepared baking dish. Smooth the top so it bakes evenly.
Bake the base: Bake uncovered for 20–25 minutes until the edges bubble and the center is hot.
Add the topping: Sprinkle the remaining fried onions evenly over the top. Return to the oven for 5–10 minutes, until the onions are golden and crisp.
Rest and serve: Let the casserole sit 5–10 minutes.
This helps it set so each scoop holds together nicely.