01 - Preheat the oven to 350°F. Grease a 9x13-inch baking dish with butter or cooking spray.
02 - If using fresh green beans, bring a large pot of salted water to a boil. Add green beans and cook for 4-5 minutes until just tender. Drain and rinse under cold water to stop cooking. Skip this step if using canned beans.
03 - In a large bowl, whisk together the cream of mushroom soup, milk, sour cream, garlic powder, onion powder, black pepper, and salt until smooth and well combined.
04 - Add the green beans, cheddar cheese if using, and French fried onions to the sauce mixture. Stir until everything is evenly coated.
05 - Pour the green bean mixture into the prepared baking dish and spread into an even layer.
06 - In a small bowl, combine the crushed Ritz crackers with melted butter. Mix until all crumbs are evenly coated with butter.
07 - Sprinkle the buttered cracker crumbs evenly over the top of the casserole.
08 - Bake for 30-35 minutes until the topping is golden brown and the casserole is bubbling around the edges.
09 - Let the casserole rest for 5 minutes before serving to allow it to set slightly.