Biblical Hebrew contains two words that translate as “prostitute”: zonah and k’deshah, with the latter deriving from the same root as the word kadosh, or “holy.” For this reason, the New American Standard Version and some other popular Bible translations render k’deshah as “cult prostitute,” reflecting the practice of some ancient pagan sects. Citing the work of the scholar Edward Lipiński, Bible History Daily explains that this view is incorrect:
Some biblical scholars, for example, have interpreted the story of Judah and Tamar as a case of sacred prostitution. According to Genesis 38, the unsuspecting Judah mistook his daughter-in-law Tamar for a veiled “prostitute” (zonah). For her services, Judah promised Tamar a sheep and gave her his seal as assurance the debt would be honored. When Judah’s friend returned to redeem the pledge, he asked in a nearby village where he could find the k’deshah. . . . [H]owever, there is nothing in the story of Judah and Tamar to suggest sacred prostitution was involved; rather, it seems that zonah and k’deshah were synonyms and that the latter has simply been misinterpreted by translators.
[The term] k’deshah likely originally referred to “consecrated maidens” who were employed in Canaanite and later Phoenician temples devoted to worship [of the goddess] Ashtoreth. As such, the biblical writers came to associate the fertility rites of Ashtoreth worship with sacred prostitution, and the word k’deshah, therefore, came to be used as a pejorative term for “prostitute.”
Indeed, archaeology has shown that Ashtoreth worship and associated rites of sacred prostitution were common throughout the ancient Mediterranean. At the Etruscan site of Pyrgi, excavators identified a temple dedicated to Ashtoreth that featured at least seventeen small rooms that may have served as quarters for temple prostitutes. Similarly, at the site of Dura-Europos on the Euphrates, archaeologists uncovered a temple dedicated to Atargatis, the Aramean goddess of love. [Near] the entrance to the temple were nearly a dozen small rooms, many with low benches. Although the rooms were used primarily for sacred meals, they may also have been reserved for the sexual services of women jailed in the temple for adultery.
Read more on Bible History Daily: https://www.biblicalarchaeology.org/daily/ancient-cultures/ancient-israel/sacred-prostitution-in-the-story-of-judah-and-tamar/