How can I order the vertex index?
Bmesh version



Here is a bmesh version of @3fingeredfrog's answer using method suggested here https://blender.stackexchange.com/a/36619/15543

Orders based on distance from scene cursor.

import bpy
import bmesh

context = bpy.context
scene = context.scene
ob = context.edit_object
mw = ob.matrix_world
cloc = mw.inverted() @ scene.cursor.location
me = ob.data

bm = bmesh.from_edit_mesh(me)
#bm.verts.ensure_lookup_table()
verts = sorted(bm.verts, key=lambda v: (v.co - cloc).length)

for i, v in enumerate(verts):
    v.index = i
bm.verts.sort()
bmesh.update_edit_mesh(me)


Could maually select all vertices in order (one by one) and retrieve from the select history

verts = [e for e in bm.select_history if isinstance(e, bmesh.types.BMVert)]


The order in question appears to be that next is furthest of all the connected verts if not visited.