See >>> Charge your Apple Pencil and check the battery - Apple Support
All rechargeable batteries, regardless of battery chemistry, require maintenance through periodic charging. In this regard, the battery within the Apple Pencil is no different to any other device that is powered by an internal battery.
If a Pencil is set-aside for an extended period, unused and uncharged, the Pencil battery may be irretrievably damaged through deep discharge. In common with all Li-ion batteries, they must always have some level of charge. The Apple Pencil battery, due its size, is particularly vulnerable.
The tiny internal Li-ion battery is susceptible to permanent/irreversible damage through being left discharged for long periods. Even some “new” pencils can exhibit signs of failure out-of-the-box if they are “old stock”.
It is essential that if you have an Apple Pencil that you charge it regularly - whether used or not - so as to protect the battery from deep-discharge. Do not allow a pencil to remain in low-charge state for any period of time - as the internal battery will fail, rendering the Pencil useless. Setting aside an unused Pencil, for extended periods, is a recipe for premature death of the Pencil battery.
If you don’t intend to use your Pencil regularly, perhaps establish a routine whereby you charge the Pencil at least weekly (perhaps use the iPad Reminders App).
For a second generation Pencil, it is generally recommended that the Pencil is docked with the host iPad whenever it is not being actively used - as this will protect the Pencil from damage and maintain optimum charge. Consider that the Pencil will be “woken” by its internal accelerometer whenever movement of any kind is detected - and as such, any disturbance at all will cause the Pencil to wake, depleting the battery. If docked with the iPad, the Pencil is maintained at full charge.
If you don’t intend to use the Pencil at all, it may be best to put the Pencil aside where it is undisturbed - taking care to remember (see Reminder recommendation) to regularly recharge the battery. A healthy Pencil battery should be okay to leave unused for at least seven to ten days - but only if it remains motionless.