Hi, thank you for contacting JustAnswer.com. My name is Russell. I will do my best to provide the right answer to your question.
When a lens in a digital camera fails to retract, or fails to move at all, there can be various causes. But most, as far as the fix for the problem is concerned, end up with the camera having to be repair-serviced, owing to the parts being delicate, the assembly and reassembly being difficult and/or involving specialized tools, and the replacement parts being hard to obtain.
However, there is one thing you can try, or two perhaps:
One, think back as to whether the batteries in the camera are fairly old.
Two, use a vacuum cleaner, set to draw air in, not blow it out, with a cleaned-off round cylindrical nozzle or cleaned attachment of that sort vaguely, to clean, all around the lens assembly and the cracks in the case around it.
Then try turning On the camera again (perhaps with fresh batteries... if so, be sure to charge the batteries up for at least 6 hours on the charger before trying them out for the first time.)
This will address the possible jamming with particulate matter, of the lens assembly. And also, the possible weakness of the batteries (if they are rechargeable and have aged) and inadequacy of their power-delivered to move the lens assembly.
After that, of course, repair-servicing would be required.
Does this answer your question?