Here is a schematic reflecting how different religions
around the world might have impacted on each other.
Some have grown out of and/or imported ideas or practices from earlier
religions.
Sometimes the sharing has been intentional
(Christianity, Islam, Sikhism).
Sometimes the influence has been secondary due
simply to crossing paths through the spread of religions over time.
(Taoism & Buddhism, Buddhist influence on Shinto, Zoroastrian
influence on Judaism)
Sometimes the sharing has been mutual, other times
one religion has had more impact on the other than vice versa.
Sometimes two religions existing in the the same time
and place have been in tension with each other,
Some have specifically rejected ideas from the
other as they both develop side by side. (Taoism and Confucianism)
Others have been rejected by later religions.
(Judaism rejecting Mesopotamian polytheism, Islam rejecting
Zoroastrianism, Buddhism rejecting some aspects of both Hinduism and
Jainism, even while being influenced by other aspects of the two earlier
religions)
Sometimes newer religions were rejected by the
older ones they grew out of. (Judaism rejecting Christianity, Islam rejecting Baha'i)