Complex sentence: He notes that Onan's sin came about because under Levirate law, it was the closest brother's duty to ensure that his family survived by marrying the widow.
Split into simpler sentences: He notes that Onan's sin was about failong to do his duty under Levirate law. Under this law it was the closest brother's duty to ensure that his family survived by marrying the widow.