01 - Preheat your oven to 375°F (190°C). Lightly grease a 9x13-inch baking dish.
02 - Bring a large pot of salted water to a rolling boil. Add the green beans and cook for 4–5 minutes until they are bright green and just tender. Immediately drain the beans and plunge them into ice water to stop the cooking process. Drain again thoroughly and set aside.
03 - In a large skillet, cook the chopped bacon over medium heat until it is crisp. Remove the bacon with a slotted spoon and drain it on paper towels. Reserve 2 tablespoons of the rendered bacon fat in the skillet and discard the rest.
04 - Add the butter to the skillet containing the reserved bacon fat. Sauté the finely chopped onion for 3–4 minutes until it becomes soft and translucent. Stir in the minced garlic and cook for an additional minute until fragrant.
05 - Sprinkle the all-purpose flour over the sautéed onions and stir to combine. Cook for 1 minute to toast the flour. Gradually whisk in the whole milk and heavy cream. Continue to cook, stirring frequently, until the sauce thickens to a smooth consistency, approximately 3 minutes.
06 - Stir in the condensed cream of mushroom soup, half of the shredded cheddar cheese, salt, black pepper, and smoked paprika. Mix until the cheese is fully melted and the sauce is smooth and well combined.
07 - Gently fold the blanched green beans and half of the crispy cooked bacon into the sauce. Toss everything together until the ingredients are evenly coated.
08 - Transfer the mixture into the prepared baking dish. Evenly sprinkle the remaining cheddar cheese, the rest of the cooked bacon, and the panko breadcrumbs over the top.
09 - Bake for 20 minutes, or until the casserole is bubbly and the topping is golden brown. If using, sprinkle the crispy fried onions over the top and bake for an additional 5 minutes.
10 - Allow the casserole to stand for 5 minutes before serving to allow the flavors to meld and the structure to set.