I kinda see it like "What Dreams May Come" - you spend some time in the afterlife and if you've been "good" (or escape your hellish prison afterlife) you get the chance to come back and try it again.
D&D cosmology is kind of all over the place.
A bunch has afterlife where you actually go to an afterlife where you go and become a petitioner or an outsider on the outer planes. But there is also oblivion and reincarnation.
2e Planescape has it where if a petitioner dies outside their outer plane they are gone, oblivion, if they die on their outer plane they merge with the plane, and they are otherwise existing or working to attain some ultimate union with the powers on their plane.
"The majority of bodies on the planes are petitioners, which are departed spirits of primes and planars whose bodies reformed on the plane that matches their previous alignment or devotion. A petitioner retains the mannerisms, speech, even general interests of his or her former self, but all memories of the past are wiped completely away. At best, a petitioner has a shadowy recollection of a previous life, but little or nothing useful can be learned from these fleeting images. Petitioners mostly desire to attain some ultimate union with the powers of their plane. This can be accomplished in a number of ways: good works, serene contemplation, steadfast faith, or vile notoriety, depending upon the petitioner's alignment.
Petitioners hate leaving their home plane, as "death" outside that place results in oblivion. Fact is, they can't be resurrected if slain at home, either; once dead, the petitioners' essences are merged with the plane, but they figure that's better than nonexistence."
2e also has the Legends & Lore different cosmologies so natural cycle reincarnation for all from Chinese and Indian cosmologies, alongside non reincarnation full permanent destination afterlife cosmologies. You could syncretize the reincarnation cosmology with the Planescape one and have souls eventually recycled back into the world, it just never says that that happens.
4e afterlife does its own thing in ultimately it is all a big unknown. Souls go to the Shadowfell after death then onto a mystery even the gods do not know.
And on top of all that, reincarnation as a spell is completely separate from a cosmological natural cycle reincarnation. From 3e on it is explicitly creating a full new adult body on the spot for the dead person. Spell reincarnation is just a weird form of raising the dead which works whether there is natural cycle reincarnation or not.