Hello,
Common causes causing erection problem are stress and anxiety, poor communication with your partner, unrealistic sexual expectations, negative feelings about non performance, smoking, alcohol and sometimes illicit drugs and medical conditions like diabetes, high
blood pressure, heart or thyroid conditions, poor circulation,
low testosterone, depression, spinal or neurological causes. In your case varicocele can be responsible for such symptoms.