Used guns do hold their value if:
- they have been well maintained,
- there are no obvious finish issues, scratches, dents, or other indications of abuse,
- the original box, any cleaning/takedown tools, and at least 1 extra mag are included,
- there is a market for that particular firearm.
You could get an idea of what your gun is worth by shopping online for your model firearm and see what the asking prices are.
At the end of the day, it's worth what a buyer is willing to pay at that moment.
I saw a rare 1975 Luger bullbarrel for sale- beautiful gun! Asking price was $3600. BUT, I was looking for a shooter rather than a collector's piece as an investment, AND there was a very deep scratch just behind the sideplate which suggested a problem with the sideplate each time the gun was shot. More bad scratches in the joint over the breech indicated to me that this gun could well have been abused... so... was a no go for me. I was not even willing to pay half that- purely because of these scratches and wear.