Genesis 38:9

New American Standard Bible (NASB)
Onan knew that the [e]offspring would not be his; so when he went in to his brother’s wife, he [f]wasted his seed on the ground in order not to give [g]offspring to his brother.

Read Genesis 38:9 in other translations