Is it okay to masturbate?

I honestly feel like me masturbating is not letting me get pregnant.. can this get in the way?