If you are having some trouble note-taking, with either lag in response or unusual interaction with the screen, such as lines appearing that weren't drawn or the Apple Pencil simply not working at all, there are a number of things that you can try in order to troubleshoot the problem and some of the common fixes are:
Check that its tip is screwed on tightly: A loose tip can render laggy inking or doesn't work at all. Please also try unscrewing the tip and cleaning the metal part.
Check its battery and recharge it if needed: Please see this Apple's article.
Restart your iPad and re-pair your Pencil: Press and hold the iPad's Sleep and Home buttons until the Apple logo appears on the screen. Wait until your iPad has restarted and then pair your Pencil again.
Try it in other apps, like Apple Notes or Freeform: If you experience similar issues, it is likely that there is a problem with the Pencil itself. We suggest contacting Apple Support for further assistance.
Check Zoom Accessibility: Please open the Settings app from the Home screen, tap Accessibility, and make sure Zoom is OFF.
Reinstall the app: Before doing this step, please ensure that all of your Goodnotes files are backed up (either manually or via iCloud sync), as uninstalling the app will also delete any local Goodnotes files on the device.
If you're using a non-Bluetooth capacitive stylus with a special tip head, try replacing the head.