Prior to this issue, when was the last time your Pencil was charged up and used?
IF your Pencil EVER lay around unused for ANY prolonged period of time without being charged up and ready to use, then
your Pencil battery may have failed and your Pencil may be dead.
Sorry.
You cannot store and/or NOT use Pencils for any prolonged period of time and NOT keep them charged up to some level.
If your Pencil/s sat around unused or unopened and not kept charged up for more than a few weeks, or so, OR
EVEN LONGER, then the battery in your Pencil may have failed and is dead and you will have to purchase another
brand new Pencil or get, if still under warranty, a free replacement Pencil from Apple.
Sorry.
And it looks like some things about the Pencil have NOT changed in the new version 2 model, either.
Due to the “always on and active/standby” nature of the Pencil and, also, due to its very tiny rechargeable Li-
ion battery ( smaller than the eraser head on a REAL wooden pencil ), the Pencil needs to be constantly charged up to some significant charge level ALL THE TIME, even when not using the Pencil for prolonged periods of time.
The Pencil needs to be kept CONSTANTLY charged to a minimum of 5-10%, OR GREATER, all the time!
If the Pencil battery is allowed to drain down to 0% and allowed to stay in that flat condition for more than a few weeks, or so, OR EVEN LONGER, that very tiny little Li-ion battery is too small to keep at a 0% state for a long period of time and it will fail and the Pencil will be dead and you may have to “pop” for another $99/$129 Pencil, once again!
Apple only has a one-year warranty on any Apple accessory items.
You need to keep your Pencil CONSTANTLY charged up all the time, even if it is only to 10%-15% charge. It must keep some charge level in that tiny Lithium-ion battery at all times!
One last ditch thing you can try is to plug the Pencil's Lightning connector into the iPad.
Then, try a simple hard reset of your iPad by holding down both the Home and sleep/wake buttons simultaneously until your iPad goes to black and restarts with Apple logo, then release the buttons.
OR
Put your Pencil 2 atop the magnetic charging edge of your iPad.
Then, try the new hard reset procedure for the 2018/2020 iPad Pro/iPad Air 4 models without a Home button.
1. Press and release the volume UP button.
2. Then immediately press and release the volume DOWN button.
3. Then, press and hold the Power button at the top. You will see the Slide to Power off button, but keep on holding down the Power button until you see the Apple logo, then let it go.
Once you have performed all the steps, wait for a few seconds and your iPad Pro will boot up completely to the iPad Pro’s Lock screen.
See if the Pencil starts charging then, when it reaches a sufficient charge, like over 15%, or so, or more, disconnect the Pencil and reconnect it to see if it Bluetooth pairs.
If it does pair, try using it.
You can also try gently warming up your entire Pencil for a few minutes wrapped in a damp dry warm/hot face cloth/towel to warm up the entire Pencil for a few attempts/minutes.
Test the Pencil, again.
If still no joy, your Pencil is definitely dead.
Sorry and Best of Luck to You!