What does Nietzsche mean by “eternal recurrence”?
Nietzsche himself did not mean anything by it, he simply commented upon the concept as expressed in Indian and Egyptian philosophy and theology.
Eternal recurrence is a form of explanation for possible predestination especially in the the cosmology of the Zoroastrian religion, upon which much of "Thus Spoke Zarathustra" is based.
The idea that the universe repeats itself over and over again, whether it be as a great circle or an Ouroboros serpent forever consuming its own tale is a very old idea, and has served as a basis for my science fiction stories, notably the 1990's TV series Lexx. Wherein the apocalypse of the entire universe is prophesied by a seer, not foreseeing the future, but by recalling in dreams the repetition of the distant past. Visions of the last cycle which they call the inevitable repetition of the future-past.