what religion did people follow in this dynasty?
They formed large hierarchical religious societies called the Way of the Five Pecks of Rice.
Han dynasty

By the 2nd century AD, Daoists formed large hierarchical religious societies such as the Way of the Five Pecks of Rice. Its followers believed that the sage-philosopher Laozi (fl. 6th century BC) was a holy prophet who would offer salvation and good health if his devout followers would confess their sins, ban the worship of unclean gods who accepted meat sacrifices and chant sections of the "Daodejing".
who was valued in han society under the philosophy of confucianism Emperor Gaozu of Han. can you mention few names of people of the royal family? Emperor Zhao (r. 87–74 BCE) , Emperor Yuan (r. 48–33 BCE)  Emperor Cheng (33–7 BCE) ,  Emperor He (r. 88–105 CE) ,  Emperor Shun (r. 125–144 CE) , Emperor Ling (r. 168–189 CE). was there slavery in this dynasty? Yes, Slaves comprised roughly 1% of the population. who was the founder of this dynasty? Liu Bang.
wiki:11581974
Han dynasty [SEP] Religion, cosmology, and metaphysics
It was believed that the three realms of Heaven, Earth, and Mankind were linked by natural cycles of yin and yang and the five phases. If the emperor did not behave according to proper ritual, ethics, and morals, he could disrupt the fine balance of these cosmological cycles and cause calamities such as earthquakes, floods, droughts, epidemics, and swarms of locusts. It was believed that immortality could be achieved if one reached the lands of the Queen Mother of the West or Mount Penglai. Han-era Daoists assembled into small groups of hermits who attempted to achieve immortality through breathing exercises, sexual techniques and use of medical elixirs.