If you never used the Apple Pencil for 3-4 months and have not kept it charged up, the Apple Pencil is dead and the battery has failed.
Since it is still under the free, one-year AppleCare warranty, if you bring that failed Apple Pencil into your local, “nearest Apple Store, the store should just give you a new, free Apple Pencil replacement.
Bring both your iPad and Apple Pencil into the store, so you can test this new Apple Pencil with your iPad, in store, to make sure everything works without a hiccup.
FYI and something Apple never divulges to it potential iPad Pro/Apple Pencil customers/users unless the potential customer/user is smart enough to ask about.
Due to the “always on and active/standby” nature of the Apple Pencil and, also, due to its very tiny rechargeable Li-ion battery (smaller than the eraser head on a REAL wooden pencil), the Apple 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 Apple Pencil needs to be kept charged to a minimum of 5-10% all the time.
If the Apple 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 Apple Pencil will be dead and you may have to “pop”, for another $99 Apple Pencil, once again, if ot fails AFTER the one-year warranty.
Good Luck to You!