To use the S Pen on a Samsung Galaxy device, you'll need to release it from its holder and tap the screen.
If your Apple Pencil isn't working, you may need to charge it or reset its connection to your iPad and pair it again.