If using frozen corn, thaw it. To speed this up, place the bag with corn in a deep casserole dish under running warm water. Open the corn bag and drain any excess of water from the corn, using a colander.
If using canned corn, drain it.
Place a large skillet or cast iron pan over medium heat, once hot add the butter and melt it.
Once the butter has been melted, add the corn kernels, sugar, cream, salt, pepper and herbs if using. Stir to combine and bring to a simmer. Cook the mixture for 3 minutes.
In a medium bowl combine milk with cornstarch (or flour) and whisk until fully combined.
Add the mixture to the pan and stir to combine. Continue to cook stirring until the mixture has thicker and the corn is cooked and tender, about 5-7 minutes.
If the mixture is too thick, add more milk or cream, 1/4 cup at a time.
If the mixture is too thin, mix another 1 tablespoon of cornstarch with 2 tablespoons of water until fully dissolved and add the mixture to the pan. Stir and bring to a simmer. Keep in mind that the mixture will thicken more as it cools.
Remove from heat and stir in the shredded parmesan cheese. Stir until fully combined and creamy. Keep in mind that the mixture will thicken more as it cools.