
The cleansing of the spirit has been a hallmark of the human experience throughout history.
The concept of purification and "soul cleansing" through water can be dated back at least as far as the ancient Sumerians (c. 3000BCE). Above we see purification basin made of basalt from the temple of Ashur.
"May the sacred waters cleanse my hands,
May the flowing river purify my soul.
As the rain revives the earth,
So too does Enki’s gift restore my spirit."
—Sumerian Purification Hymn
(Temple of Eridu)

The ancient Greeks performed a purification ritual called "katharsis" to Apollo (the god of purification and healing). The Temple to Apollo at Delphi (shown here) would have been a mecca for those seeking better health from the god.
The Hindus, Egyptians, Romans, Chinese and several Native American tribes also had purification rituals involving water.
This is what historians call "parallel invention". It's where different cultures come up with the same practice on their own.
The global incorporation of water in such soul cleansing ceremonies is a natural and likely progression from it's use in cleaning the body.

The concept of baptism as currently prescribed by the Christian faith may have been evolved by John the Baptist (shown here) from the Jewish "Mikveh".
The Mikveh is a ritual bath used for spiritual purification. It is traditionally required for conversion, after childbirth, before religious observances, and for maintaining ritual purity.
Baptism is a Christian sacrament signifying spiritual cleansing, rebirth, and initiation into the faith. It typically involves immersion in or sprinkling with water, symbolizing purification from sin and entry into a new life with God.
Baptism is rooted in the practices of John the Baptist, who baptized Jesus and others as an act of repentance. In many Christian traditions, it is considered essential for salvation.