In a bowl, mix drained sweet corn, mayonnaise, melted butter, sugar, salt, black pepper, and garlic powder until well combined.
Spread the corn mixture evenly in an oven-safe skillet or baking dish. Sprinkle shredded mozzarella cheese generously on top.
Preheat the oven to 375°F (190°C). Bake for about 12–15 minutes or until the cheese is fully melted and bubbly. For a golden brown top, broil for an additional 2 minutes.
Remove from the oven and sprinkle chopped green onions on top. Let it sit for a minute before serving to allow the cheese to set slightly.
Serve hot as a side dish with grilled meats or enjoy it with crispy tortilla chips. Pair it with Southern Chocolate Cobbler for a comforting meal!