You should always keep your second generation Apple Pencil docked with your iPad when not being used - as this will keep the battery optimally charged - and, importantly, protect the tiny pencil battery from damage.
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.