Applying periodic boundary condition in FEniCSx

Please read Read before posting: How do I get my question answered? . Never post your code and your error as images: they are impossible to copy and paste, impossible to search, and sometimes difficult to even read (look at how small the font is in your first picture, and imagine I was reading this message from a cellphone)

Look at GitHub - jorgensd/dolfinx_mpc: Extension for dolfinx to handle multi-point constraints. for periodic BCs (and much more) in dolfinx.