Preheat the oven to 450°F (232°C). Line a large baking sheet with parchment paper or a silicone baking mat.
Separate the thinly sliced onion into individual pieces.
Prepare three shallow bowls. Add the flour to the first bowl. Combine the panko breadcrumbs, ½ teaspoon salt, and ¼ teaspoon black pepper in the second. Whisk the egg and milk together in the third.
Coat each onion slice first in flour, then in the egg mixture, and finally in the seasoned panko breadcrumbs.
Arrange the coated onions in a single layer on the prepared baking sheet.
Bake for approximately 20 minutes, carefully turning the onions twice during baking so they brown evenly. Remove once crisp and golden and set aside.
Bring a large pot of water and 1 tablespoon salt to a boil.
Add the fresh green beans and cook for 5 minutes.
Immediately transfer the beans to a large bowl of ice water to stop the cooking process. Once cooled, drain them thoroughly and set aside.
Melt the butter in a large oven-safe skillet over medium-high heat.
Add the sliced mushrooms, 1 teaspoon salt, and ½ teaspoon black pepper. Cook for approximately 5 minutes, or until the mushrooms release much of their moisture.
Stir in the minced garlic and cook for another 1–2 minutes.
Sprinkle 2 tablespoons of flour over the mushrooms and stir until everything is evenly coated.
Gradually pour in the broth while stirring. Allow the mixture to simmer for approximately 3 minutes.
Reduce the heat to medium-low and gradually stir in the half-and-half. Cook for approximately 10 minutes, stirring occasionally, until the homemade mushroom sauce becomes creamy and thick.
Remove the skillet from the heat. Fold in all the green beans and approximately one-quarter of the baked onions.
If your skillet isn't oven-safe, transfer the mixture to a lightly greased 2–3-quart casserole dish.
Scatter the remaining baked onions over the Creamy Green Bean Casserole from Scratch.
Reduce the oven temperature to 400°F (204°C) and bake for approximately 15 minutes, or until the creamy sauce is bubbling around the edges.
Serve warm.