Chosen Solution

When starting it up the lens won’t come out of the barrel and a message “lens error” shows up. Is the lens part serviceable? Replaceable?

A whole range of different faults can cause Lens Error, both electronic and mechanical. If it’s a mechanical problem there are a few things you can try listed at https://wiki.restarters.net/Compact_came… If none of those work, realistically, your only hope is probably to look out for another camera of the same model on ebay with a different fault - hopefully you could get one quite cheaply. Swapping the lenses shouldn’t be too difficult.