01 - Preheat oven to 350°F. Lightly grease a 9x13-inch baking dish with cooking spray or butter.
02 - Bring a large pot of salted water to a boil. Add green beans and cook 4–5 minutes until just tender. Drain and rinse under cold water to stop cooking.
03 - In a large skillet over medium heat, melt 1 tablespoon butter. Sauté onion until softened, about 3 minutes. Add garlic and cook 1 minute more until fragrant.
04 - In a large bowl, combine cooked green beans, sautéed onions and garlic, cream of mushroom soup, milk, cheddar cheese, sour cream, salt, pepper, and thyme. Mix until evenly coated.
05 - Spread the green bean mixture evenly in the prepared baking dish.
06 - In a small bowl, combine crushed Ritz crackers with remaining melted butter. Toss until crackers are evenly coated.
07 - Sprinkle cracker mixture evenly over the casserole. Bake for 30–35 minutes until bubbly and topping is golden brown.
08 - Let stand 5 minutes before serving to allow the casserole to set.