Preheat the oven to 375°F. Melt 4 tablespoons of butter in a large skillet over medium. Add the onion and garlic and cook for 5-6 minutes or until the onion softens and the garlic is fragrant. Stir in the kosher salt and black pepper.
Sprinkle the flour over the onion mixture and cook for 1 minute, stirring, to lose the raw flour flavor. Add the chicken broth and stir to combine. Whisk in the cream or half-and-half until smooth, add the dried thyme, and stir in the soy sauce. Cook for 5-7 minutes on medium-high for the sauce to reduce and thicken.
Add the green beans and stir well to combine. Cook until bubbly and the green beans are warmed through.
Transfer the beans to a 9 X 13 baking dish then evenly sprinkle the top with the fried onions. Bake for 30 minutes or until warmed through and the top begins to brown.
Notes
• If using frozen green beans, thaw and drain before mixing. • If using fresh green beans, bring a large saucepan of water to a boil with 1 teaspoon of salt. Add the chopped green beans and cook for 5 minutes until tender but still crisp. Drain and immediately transfer to a large bowl of ice water to stop the cooking process. Drain and set aside.