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 process.
03 - In a large bowl, whisk together the cream of mushroom soup, milk, sour cream, garlic powder, onion powder, black pepper, and salt until completely smooth and well combined.
04 - Add the green beans, cheddar cheese if using, and French fried onions to the sauce mixture. Stir until all components are evenly coated.
05 - Pour the green bean mixture into the prepared baking dish. Spread evenly with a spatula, ensuring the surface is level.
06 - In a small bowl, combine the crushed Ritz crackers with melted butter. Mix thoroughly until all crumbs are evenly coated with butter.
07 - Sprinkle the buttered cracker mixture evenly over the top of the casserole, covering the entire surface.
08 - Bake for 30-35 minutes, or until the topping is golden brown and the casserole is bubbling around the edges.
09 - Remove from oven and let rest for 5 minutes before serving to allow the casserole to set.