This support page may be helpful with pairing and use of the Pencil with your iPad:
Connect Apple Pencil with your iPad - Apple Support
If you continue to experience difficulties, here is one of the better troubleshooting guides:
https://appletoolbox.com/apple-pencil-not-working-heres-our-troubleshooting-guide/
Ensure that the user-replaceable Pencil tip is snugly screwed into position; when fitted correctly you should see a tiny gap, of about the thickness of a sheet of paper, between the tip and pencil body. If slightly loosened, or overtightened, the Pencil may not work properly, if at all.
If you need assistance, the technicians at the Genius Bar of your local Apple Store or Apple Authorised Service Provider (AASP) will be able to test and assess your iPad and Pencil:
Genius Bar Reservation and Apple Support Options - Apple