How to access bpy.props.StringProperty() from a different class?
Window Manager keeps track of registered operators
Lets say we add a property to the simple operator template, and make it register - undo
class SimpleOperator(bpy.types.Operator):
    &quot;&quot;&quot;Tooltip&quot;&quot;&quot;
    bl_idname = &quot;object.simple_operator&quot;
    bl_label = &quot;Simple Object Operator&quot;
    bl_options = {'REGISTER', 'UNDO'}
    xxx : bpy.props.StringProperty(default=&quot;foo&quot;)

Invoke it from the UI

Then in python console use WindowManager.operator_properties_last
&gt;&gt;&gt; op = C.window_manager.operator_properties_last(&quot;object.simple_operator&quot;)
&gt;&gt;&gt; op.xxx
'ggggg'

Note the template class name is SimpleOperator but really should be OBJECT_OT_simple_operator to match its id name &quot;object.simple_operator&quot; as per the naming convention
Store in blend objects
Alternatively store properties on ID objects in blender, eg scene, object, mesh etc.  Scene is often used as a &quot;global&quot;.
from bpy.props import StringProperty

bpy.types.Scene.xxx = StringProperty()

set in an operator with
context.scene.xxx = self.my_string

retrieve with
print(context.scene.xxx)

layout with
layout.prop(context.scene, &quot;xxx&quot;)