Objects constructed with bpy.ops.mesh.primitive_*
are automatically active. If there's no selection-changing operations immediately after object creation, you can access it through bpy.context.active_object
bpy.context.active_object
or bpy.context.object
bpy.context.object
.