Thanks for your query.Based on the facts that you have posted it appears that you have
what is called as Phimosis
with collection of smegma around the glans penis
The only treatment option is to get circumcised .
This is very small surgery done by a qualified General Surgeon
under local anesthesia
as a day care surgery.
It will solve your problem for forever and you will enjoyable sexual life in future.