How to execute an operator from an EnumProperty?
Try this
The following script basically does what you want, although I stick to my recommendation to NOT add primitives based on changes of enumerations. Those changes are also tracked when you set the enum value through python, so you might run into real nightmare further down the road. This is only one possible reason for using a dedicated operator with a button that runs it, but in the end it's up to you.
The script here is only modified in three details compared to your's:

I've added the update_enum method at the beginning, calling the operator
I've corrected a spelling mistake for the operator call to the uv_sphere_add function
I've added the call to the update_enum() function in your EnumProperty

Besides that, the code is the same as yours. Note that in case of the update_enum function, self is already the current scene, so I can happily access the current enum value using self.my_enum.
import bpy

def update_enum(self, context):
    # self = current scene in an EnumProperty callback!
    print(self.my_enum)
    eval('bpy.ops.%s()' % self.my_enum)
    

class LayoutDemoPanel(bpy.types.Panel):
    bl_label = &quot;Test&quot;
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'

    def draw(self, context):
        layout = self.layout

        layout.label(text=&quot;Enum prop&quot;)

        scene = context.scene
        layout.prop(scene, &quot;my_enum&quot;, expand=True)


def register():
    bpy.utils.register_class(LayoutDemoPanel)

    bpy.types.Scene.my_enum = bpy.props.EnumProperty(
            name = &quot;My enum&quot;,
            description = &quot;My enum description&quot;,
            items = [
                (&quot;mesh.primitive_cube_add&quot;, &quot;Cube&quot;, &quot;Create a cube&quot;),
                (&quot;mesh.primitive_uv_sphere_add&quot;, &quot;Sphere&quot;, &quot;Create a Sphere&quot;),              
            ],
            update=update_enum
        )

def unregister():
    bpy.utils.unregister_class(LayoutDemoPanel)

    del bpy.types.Scene.my_enum


if __name__ == &quot;__main__&quot;:
    register()