How to import a STL file using the file browser?
You can just add the built-in operator import_mesh.stl to your draw method of your panel which will open up the File Browser as usual and allows the user to select one .stl file:

import bpy

class OBJECT_PT_CustomPanel(bpy.types.Panel):
    bl_label = &quot;My Panel&quot;
    bl_idname = &quot;OBJECT_PT_custom_panel&quot;
    bl_space_type = &quot;VIEW_3D&quot;   
    bl_region_type = &quot;UI&quot;
    bl_category = &quot;Tools&quot;
    bl_context = &quot;objectmode&quot;

    def draw(self, context):
        layout = self.layout
        #layout.operator_context = 'INVOKE_DEFAULT' #'INVOKE_AREA'
        layout.operator(&quot;import_mesh.stl&quot;, text=&quot;New&quot;, icon='FILE_NEW')

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

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

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

Related: How to call a confirmation dialog box?

In case you want to import and modify the .stl object for whatever reason, have a look into the Operator File Import template (operator_file_import.py) that comes with Blender.

Demo operator based on the template, allows to import the file, print the object reference and assigns a new material to the incoming object in one go:
# ImportHelper is a helper class, defines filename and
# invoke() function which calls the file selector.
from bpy_extras.io_utils import ImportHelper
from bpy.types import Operator

class ImportSomeData(Operator, ImportHelper):
    &quot;&quot;&quot;This appears in the tooltip of the operator and in the generated docs&quot;&quot;&quot;
    bl_idname = &quot;import_test.some_data&quot;
    bl_label = &quot;Import Some Stl File&quot;
    bl_options = {'REGISTER', 'UNDO'}
    
    # ImportHelper mixin class uses this
    filename_ext = &quot;.stl&quot;
    filter_glob: bpy.props.StringProperty(
                default=&quot;*.stl&quot;,
                options={'HIDDEN'})
                
    def execute(self, context):
        if self.filepath:
            bpy.ops.import_mesh.stl(filepath=self.filepath)
            # Print the imported object reference
            print (&quot;Imported object:&quot;, context.object)
            # Create a material
            mat = bpy.data.materials.new(name=&quot;STLMaterial&quot;)
            # Append the material to the last slot
            context.object.data.materials.append(mat)

        return {'FINISHED'}

Further reading:

How to assign a new material to an object in the scene from Python?
Import multiple STL files and modify the incoming objects in one go?