Heat a large pot of water on the stove top and bring it to a full boil. Add the trimmed and chopped green beans. Cook for 8 to 10 minutes or until the green beans have softened but are still slightly al dente. This cooking process ensures the green beans are nice and soft rather than overly crunchy.
Drain the green beans into a colander then pat them dry with a paper towel. Transfer drained green beans to a large casserole dish then drizzle with 1 tablespoon of avocado oil and sprinkle with ½ teaspoon of sea salt. Mix everything together until the green beans are lightly coated with oil and salt.
You can prepare the rest of the recipe while the green beans are cooking.
Preheat the oven to 400 degrees Fahrenheit.
Heat a large skillet over medium-high heat and cook the bacon, flipping every 2 minutes, until much of the fat has rendered and the bacon reaches your desired level of crisp. Transfer the bacon to a cutting board and allow it to cool. Once cool, chop the bacon into small bits.
Use the bacon fat to sauté the onion and cook the sauce. Keeping the bacon drippings on medium-high heat, add the chopped onions to the skillet. Sauté, stirring occasionally, until onions have softened, about 5 to 8 minutes. Stir in the garlic and cook for another 2 minutes.
Add in the canned coconut milk and bring the mixture to a full boil. Allow the mixture to cook at a full boil, stirring occasionally, for about 5 minutes.
Stir in the grated cheese, most of the chopped bacon, the remaining ½ teaspoon of salt and black pepper. Mix until the creamy sauce is thick and well-combined.
Note: If using cream instead of coconut milk, be sure to monitor the sauce closely so that it doesn’t come to an uncontrolled boil. You want to cook it to a gentle simmer and cook until thick, but don’t bring it to a boil.
Pour the creamy cheesy sauce mixture over the green beans and mix everything together until the beans are well-coated with sauce.
Sprinkle the rest of the cheese (and any added cheese) over the saucy green beans and bake at 400 degrees F for 20 to 30 minutes or until the cheese is golden-brown and the sauce is bubbly.
Remove the cheesy green bean casserole from the oven and sprinkle with the remaining cooked bacon bits. Serve alongside your main entrée and enjoy!