Heat a non-stick pan over medium-high flame. Add butter and allow it to melt completely. Once it starts bubbling, add chopped garlic. Cook for a few minutes until it is fragrant.
Then add the chopped onions into the pan. Continue to saute the onions until they become translucent.
Add the thawed sweet corns and cook for 3-4 minutes. The corns should become soft.
Lower the flame and pour milk. Bring it to a simmer. Then add cheddar cheese and chopped green chillies. Mix well. Allow the cheese to melt completely. Turn the flame off.
Garnish with finely chopped green chillies and red chilli flakes.