The moon definitely, definitely is not made of cheese. No matter what you saw on Wallace and Gromit, that is an unarguable fact. So where did the ridiculous myth come from anyway?
The “moon being made of cheese” myth isn’t really a myth at all; in order for something to be a myth, people need to actually believe that it could be true – and there’s no evidence that anyone ever actually thought the moon was made of cheese (at least, no one was willing to admit that they believed it). The first instance of the moon being made of cheese in legend is from a Servian tale of the Middle Ages. In the story, a very hungry wolf is on the chase, following a fox who seems pretty inept at escaping. The wolf thinks he’s in for a nice, quick snack, but the clever fox uses his wits to gain escape: he convinces the wolf that the reflection of the moon in some nearby water is actually a block of cheese bobbing gently on the surface. To get at the cheese, the wolf has to drink all the water in the pond. The greedy (and very stupid) wolf drinks and drinks and drinks, eyes on the prize, until he eventually explodes from drinking too much. The fox stays alive and walks away the victor.
However, the story most people know best is from 1546 and is included in The Proverbs of John Heywood. The book is a collection of some still-used phrases coined by the author; you’d probably recognize such classic one-liners like “the more, the merrier” and “Rome was not built in a day”. Heywood writes the following joke-y statement in the book: “the moon is made of greene cheese.”
The next hundred years saw the notion re-used in a number of ways, becoming more commonplace over time. For example, in 1638 John Wilkins wrote of gullibility, saying that peasants could be made to believe that the moon was made of cheese.
Of course, no scientific institution in the history of mankind has ever claimed that the moon was actually made of cheese (because, y’know, it’s not), but that hasn’t stopped the claim from remaining present in our collective consciousness.
And even the most respected of scientific communities enjoys joking around now and then; NASA claimed, on April Fool’s Day in the early aughts, to have finally found conclusive evidence that the moon was made of cheese. The claim was accompanied by a picture of the moon with a stamped expiration date photoshopped onto one of the moon’s craters.