The Buddhism afterlife belief is pretty similar to Hinduism. In that everything dies and would then be reincarnated.
There is also karma just like in Hinduism and depending on the karma accumulated one could be reborn as a human or animal or ghosts. Even demigods or even one of the gods themselves.
Though it is more complicated than that as it is believe that there is no soul. Rather than soul, its just an accumulation of karma, thoughts and desires.
To escape from the cycle of living and dying while experiencing all the feelings and suffering you get with it, you need to achieve the state of Nirvana. Or the state of enlightenment. In this state, you would be an eternal being that’s just existing and free from any worldly suffering. Though it is not entirely clear what exactly is the Nirvana as it is said to transcend normal thinking.
So, even with all this, Buddhism still believes the god of the dead, Yama. The same Yama from Hinduism. He governs Naraka and judges the dead to either be punished, rewarded or to go straight to reincarnation.