Preheat your oven to 350°F and butter a 9x13-inch baking dish generously. This prevents sticking and adds extra buttery flavor to the edges of your casserole.
Melt 4 tablespoons butter in a large saucepan over medium heat, then sauté the diced onion until softened and fragrant. This takes about 3-4 minutes and builds a flavor foundation for the corn mixture.
In a separate bowl, whisk together 1 cup heavy cream, 1 cup whole milk, 2 eggs, salt, pepper, and garlic powder until well combined. Pour this custard-like mixture into the saucepan with caramelized onions, stirring constantly for about 2 minutes.
Mix the cornmeal, all-purpose flour, and baking powder in a small bowl, then fold this dry mixture into the cream base along with all 4 cups corn kernels and cheddar cheese. The buttery corn casserole crowd recipe relies on gentle folding to keep the corn kernels intact and prevent overworking the batter.
Pour the entire mixture into your prepared baking dish and smooth the top with a spatula. Bake for 35 minutes until the top is golden brown and a knife inserted near the center comes out clean.
Remove from the oven and let it rest for 5 minutes before serving. This allows the casserole to set slightly and makes portioning easier for your guests.