I want to make a new object out of selected verts via Bmesh
import bpy
import bmesh
object = bpy.context.object
bm = bmesh.from_edit_mesh(object.data)
bmesh.ops.duplicate(bm, geom=[v for v in bm.verts if v.select])
name = 'Object'
mesh = bpy.data.meshes.new(name)
bm.to_mesh(mesh)
mesh.update()
bm.free()
object = bpy.data.objects.new(name, mesh)
bpy.context.scene.collection.objects.link(object)