I think Jewish ideas about “endgame” evolved over time. You can see a progression in the Old Testament.
I do not think there is any well-developed idea of an “afterlife” in Judaism (or, for that matter, even in early Christianity, but that’s another story.)
In the early books, there is really no end game, it’s just dust to dust. God presents you with carrots and sticks that deal solely with earthly rewards and punishments. My favorite example is Deuteronomy 28. If you follow God’s commandments, you’ll be rewarded with lots of crops and victory in warfare. If you don’t follow God’s commandments, you’ll be struck with disease, famine, sold into slavery, and be forced to eat your own children, and God will “take delight” in ruining and destroying you. Importantly, there are no afterlife rewards or punishments in this passage.
In the later books of the Prophets, we start to see some ideas about “salvation.” But this was not really a salvation of individuals, and it did not have to do with an afterlife. Instead, the “endgame” has to do with the end of a bad political situation. The Prophets books were written during the “Babylonian captivity” period. In short, things were not going very well for the Jews during this time, and it was frustrating. On one hand, their holy texts brag about how they’re supposed to have this perfect set of laws and a protective God who slays their enemies. On the other hand, in reality, they were badly beaten in warfare by an advanced civilization, their Temple was destroyed, and they were taken from their homeland.
As you can imagine, the Jews had a number of reactions to this situation. Some thought their troubles were punishment from God for not being holy enough. But others developed an idea that God was going to “save” them—that God would come down from heaven and destroy the Babylonians, free the Hebrews, and establish a golden age or a “kingdom of heaven” on earth In Ezekial and Daniel, you can see how the prophets fantasize about this happening.
So that was really the extent of a Jewish “endgame” in the OT. I don’t think there’s any evidence they thought you went to heaven if you were good and hell if you were bad. Heaven was a place in the sky, literally, where Yahweh lived with all his magical creatures. If you were a lucky prophet, you could get taken up there by one of Yahweh’s messengers and shown a vision of the future salvation of your tribe. Such “apocalypses” (i.e. “revelations”) eventually became a major form of literature. The Book of Revelation in the NT is one of many examples from late antiquity.