The decision to go for surgery depends on the severity of the nerve compression in your back due to disc prolapse. Get it evaluated by an orthopaedic surgeon / spine surgeon / neurosurgeon. They might suggest you to go for an MRI as that's the gold standard and that would tell you whether you need surgery or not.
And regarding the effects of surgery, most of the patients lead a happy life without any effect on their sexual health. So don't worry, even if you end up in surgery.
Health Tips
For time being, avoid forward bending, lifting heavy weights, abnormal sitting and sleeping posture, prolonged standing and sports activities.