Questions about how to load an STL format file into the dolfinx and construct a mesh

This is because you Need to use GMSH physical entities if you want to load from MSH files.

See for instance: Meshio does not read Gmsh physical groups - #19 by dokken

Note that dolfinx can read xdmf files, so you could read that.