NET Bible
"But Er, Judah’s firstborn, was evil in the LORD’s sight, so the LORD killed him."
— Genesis 38:7, NET Bible
“And Er, Judah’s firstborn, was wicked in the sight of the Lord; and the Lord slew him.”
She became pregnant again and had another son, whom she named Onan.
Then she had yet another son, whom she named Shelah. She gave birth to him in Kezib.
Judah acquired a wife for Er his firstborn; her name was Tamar.
But Er, Judah’s firstborn, was evil in the LORD’s sight, so the LORD killed him.
Then Judah said to Onan,“Sleep with your brother’s wife and fulfill the duty of a brother-in-law to her so that you may raise up a descendant for your brother.”
But Onan knew that the child would not be considered his. So whenever he slept with his brother’s wife, he wasted his emission on the ground so as not to give his brother a descendant.
What he did was evil in the LORD’s sight, so the LORD killed him too.