They believed that people continue to reincarnate until they reach Moksha. However, Moksha was believed to be only achieved in the top three caste and not anything below. The caste represents how wealthy you are and only wealthy people can break the chain of reincarnation. In Buddhism, it was believed that if you follow the Eightfold Path, anyone could reach nirvana or in other words, a release from selfishness and pain. Once you reach nirana, the chain of reincarnation will be broken. However, in Buddhism, anyone from in social class can reach Nirvana whereas in Hinduism, only the top three caste can reach Moksha. Buddhism is more appealing to the poor people whereas Hindusim can be seen to be more appealing to the upper class people.
The philosophies of Confucianism, Taoism, and Legalism were all founded towards the end of the Zhou Dynasty. The Zhou Dynasty was coming into a decline after the Warring States Period where the eight states of the Zhou Dynasty region were having constant warfare with each other over territory and