First, if you have not already updated your iPad to the most recent version of iPadOS, you should do so. iPadOS 13.6.1 is current.
Assuming that you do not have any other iPad charging issues - and that the Lightning Port of your iPad is free from debris - whilst the Pencil is plugged-in to the Lightning Port of your iPad, verify that the Pencil is recognised:
Settings > General > About
Scroll to the bottom of the page - and you should find two identical entries for the Pencil (one each for the physical and Bluetooth connections). If both entries are present, the Pencil electronics are good.
Whilst connected to your iPad, verify the Pencil charging status from the Battery Widget - this being accessed from your first Home Screen. Your Pencil should show that it is charging - with an increasing battery charge percentage. If not, then perhaps you have a bad Pencil.
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.
If the Pencil Battery has failed, the only remedy is to replace the Pencil. Being new (?) you should look to having it replaced.
I hope this information proves to be helpful in both diagnosing and resolving the problem.