you problem of not being able to retract foreskin completely behind the ring of penis easily in erect state is called Phimosis.
Next Steps
You should consult general surgeon for physical examination. If doctor feels that it may be treated with non surgical approach, he can prescribe a steroid ointment and after applying it you need to gradually stretch the skin daily for one month. If this does not succeed surgical intervention is needed.
Circumcision is the minor surgery for treatment. It removes foreskin. It is very small procedure. 15 minutes. Done under anesthesia
You can resume your routine in two days and can have sex life after 3 weeks.
Other procedure is frenuloplasty.
Foreskin is attached with penis with a skin band called frenulum. When frenulum is short and not allowing skin to go back in that case surgery on frenulum is done. It is called frenuloplasty.
You can be discharged on the same day.
Health Tips
not to worry.. it is not a major issue