entities to geometry computes the geometry (node indices) of an entity of any dimension (vertex, Edge, facet, cell). The nodes are listed per entity.
Compute incident entities takes in a list of entities, and returns a single list of all entities of dimension d1 connected to these.
In the case of a linear geometry, all nodes = vertices, and the connectivities might be the same for your call (not always guaranteed).