check that youriPads Bluetooth is turned on.
If not, it wont be able to detect your Apple Pencil.
Can I Charge My Apple Pencil Without a Charger?

Apple
Fortunately, neither the first nor second-generation Apple Pencils require a charger to recharge their batteries.
The original Apple Pencil can be plugged directly into an iPads Lightning port to get more power.
Does Apple Pencil Really Need to Charge?

Apple
Unlike other styluses that use replaceable batteries, both the first and second-generation Apple Pencils feature built-in rechargeable batteries.
How Long Does It Take to Charge an Apple Pencil?
Just 15 seconds of charging will give you approximately 30 minutes of power.

Apple
it’s possible for you to stop the charging process at any time.
you could check the charge level of your Apple Pencil by using theBatteries widget on your iPad.
Why Won’t My Apple Pencil Charge On My iPad?
Also, confirm your iPad is turned on and is itself charged or plugged into a power source.
An Apple Pencil wont charge if the iPad has no power.
Depending on the generation of Apple Pencil you have, different iPads will be compatible with it.
ConsultApple’s official Apple Pencil compatibility pageto see which Pencils work with which iPads.