The main character in the story "A Horse and Two Goats" by R. K. Narayan is Muni. We can know this by several ways.
Muni is the character who receives the most "narrative action," meaning most of the narrative is centered on Muni and his actions. In most narratives, the narrative events tend to center around the main character, or "protagonist."
We can also observe that we, the reader, have more access to Muni's interiority (his internal thoughts) than we do for any other character. We hear Muni's thoughts much more frequently than the American's thoughts, for example: "Muni felt totally confused but decided that the best thing would be to make an attempt to get away from this place."
We also know that Muni is the main character because the meaning of the story is most tied to his thoughts, actions, and fate. We can say that this is Muni's story, because it is tied, intrinsically, to who Muni is as a person. For example, we know that Muni likes to sit out by the highway because it allows him to get away from the village, where he feels humiliated by other people's judgments. Another character, less prone to feeling bad about his poverty and age, would not have sat by the horse statue and met the American. Another character may not have been so indulgent as to talk with the American for so long, despite not understanding his speech. Another character would not have been so eager to sell his goats.
Said another way, "A Horse and Two Goats" is the story of a materially poor but spiritually rich man who catches a lucky break because of his nature and his circumstances. It could not be such a story if Muni were different than he is.