First of all, please specify what version of FEniCS you are using. Are you using legacy FEniCS or DOLFINx?
In legacy FEniCS, you can use the command (ALE.move(mesh, deformation)) to change your mesh, while you would deform the geometry directly in FEniCSx, as shown in: Changing the shape in the surface normal directions - #6 by dokken