This cartoon is a dramatization designed to highlight philosophical tensions in quantum mechanics. There is no historical record of Albert Einstein and Niels Bohr having this specific exchange. The question “Do you really believe the Moon exists only when you look at it?” was posed by Einstein to his biographer Abraham Pais, as recounted in this article from The New York Review of Books .
The statement “We now know that the Moon is demonstrably not there when nobody looks” was made by physicist N. David Mermin in 1985, as a provocative summary of the implications of the Copenhagen interpretation of quantum mechanics. You can read Mermin’s full article here or on the Internet Archive.