If you have access to fresh corn on the cob during the season, it can be nice to actually substitute fresh corn straight off the cob for corn that you are putting into any recipe you might be making. The changes in the taste when you use fresh corn on the cob versus frozen or canned are quite significant. It is definitely worth the extra effort of using fresh corn straight off the cob in a recipe, especially if corn is the star of the dish.
That said, it can be hard to figure out just how much corn you would get from an ear of corn, if your recipe calls for something like one cup of corn. And it would be a pain to cook more ears of corn because you miscalculated.
One medium-sized ear of corn will make one cup of fresh corn, once it has been cooked and removed from the cob. So it is easy to factor in 1 cup of corn per when ear of corn, especially if you are calculating something like a corn chowder that takes several cups of corn.
You do want to cook the corn ahead of time, because most recipes call for corn that’s either been frozen or that has been canned, which is partially cooked.