Hello and good night.
I am sorry to hear that your P500 no longer takes pictures.
You say that the camera is about 6 years old. Over time, some functions of the camera tend to become unstable in some models. While they may focus fine, the picture taking and flash functions can malfunction for numerous reasons. A few include the camera being dropped, a very hard bounce, or simply faulty controls. The latter can still occur despite the camera being rarely used.
I would recommend that you have an authorized repair center take a look at the camera for you so that a proper diagnosis can be made of the reason why your camera is behaving the way it is. If you would like to find a Nikon Authorized Repair Station close to you, please click here. Follow the instructions on the page.