Place the corn directly on the grill grates and cook for 8–10 minutes, turning occasionally, until the corn is tender and lightly charred in spots.
For the air fryer
Preheat the air fryer to 400°F.
Brush the corn with melted butter.
Place the corn in the air fryer basket and cook for 10-15 minutes, turning occasionally, until the corn is tender and lightly charred in spots. (The exact time depends on the size and wattage of the air fryer.)
Assemble
Stir the mayonnaise, sour cream, lime zest, lime juice, chili powder, garlic powder, and salt in a small bowl until smooth.
Once the corn is cooked, spread the mixture over each ear while it is still hot.
Coat in cotija cheese by rolling it on a plate with the cheese and finish with a sprinkle of chopped cilantro and a light dusting of additional chili powder.
Serve immediately with a squeeze of lime juice over the top.