This is said as-is to mean that you must try in order to succeed. Even if you fail, you cannot succeed if you do not take some risks.
Example: Oh well. I didn’t win the lottery today, but nothing ventured, nothing gained. Maybe I will win next time.