Complex sentence: Like his older brother, Er, Onan was killed by Yahweh for spilling his seed on the ground instead of impregnating his brother's widow.
Split into simpler sentences: Like his older brother, Er, Onan was killed by Yahweh. Yahweh killed Onan for spilling his seed on the ground instead of impregnating his brother's widow.