Cooking corn on the cob is all about timing, you want to catch it when it's still juicy and sweet, but not so soon that it's still raw. Think of it like trying to catch a perfect wave at the beach, you need to time it just right or you'll end up with a mouthful of sand. If you cook it for too long, the corn can become mushy and unappetizing, so keep an eye on it and check frequently.
Another way to ensure your corn on the cob is cooked to perfection is to use the "water test", simply drop the corn into a large pot of boiling water and let it cook for 5-7 minutes, or until it's tender when pierced with a fork. You can also try grilling the corn, this will give it a nice smoky flavor and a bit of char, just be sure to turn it frequently to avoid burning. The key is to find the method that works best for you and your cooking style.
How to Cook Corn on the Cob: Simple Steps for Perfect Results