Want to import already defined physical groups of Microstructure in Gmsh to FEnics

You have completely messed up your installation. There must not be anything FEniCS-related in ~/.local/lib/python3.10/site-packages: remove ffc and ufl from there, and double check that there aren’t other FEniCS packages there.