The first Apple Pencil grip covers the whole pencil and so provides a degree of protection from accidental damage. Note, though, that this type of grip is usually a little fiddly to slip on and off, and if you have an Apple Pencil 2, it may interfere with the double-tap function.
The second type only covers part of your Apple Pencil, so it provides less protection and – if such things are important to you – arguably compromises its sleek aesthetic. Also, you probably won't be able to charge your Apple Pencil 2 magnetically with the grip attached. On the plus side, though, this type of Apple Pencil grip is usually easier to slip on and off, and generally provides a fuller, more ergonomic grip in the hand for drawing and painting.
To keep your Apple Pencil safe, you might want one of the best iPad cases with pencil holders.