Genesis 38:10-11 (YLT)
10 and that which he hath done is evil in the eyes of Jehovah, and He putteth him also to death.
11 And Judah saith to Tamar his daughter-in-law, ‘Abide a widow at thy father's house, till Shelah my son groweth up;' for he said, ‘Lest he die--even he--like his brethren;' and Tamar goeth and dwelleth at her father's house.
About Genesis 38: This chapter sits between Joseph’s story and the later history of Jacob’s family. It moves the focus from Joseph to his brother Judah. The setting is Canaan, where Judah leaves his brothers and marries a local woman. He has three sons. Two die because they are wicked in God’s eyes. Judah keeps his daughter-in-law Tamar as a widow, waiting for his third son Shelah to grow up. But he fears losing Shelah too, so he does not give her to him as the law requires. This is a failure of duty and faith. Read the study notes
2 verses · Compare in parallel · Read all of Genesis 38