Some people mistakenly believed that Onan was punished by God for spilling his seed on the ground, but this did not even involve masturbation - by
the laws of
the Israelites at
the time, it was his duty to impregnate
the wife of his dead brother to keep the family line going, and he was willing to have sex with her, but NOT to father children by her, so he pulled out to avoid getting her pregnant & that was his sin. If the Bible does not condemn it, why should you or anyone else?