We use the resonant dipole-dipole interaction between Rydberg atoms and a periodic external microwave field to engineer XXZ spin Hamiltonians with tunable anisotropies. The atoms are placed in 1D and 2D arrays of optical tweezers, allowing us to study iconic situations in spin physics, such as the implementation of the Heisenberg model in square arrays, and the study of spin transport in 1D. We first benchmark the Hamiltonian engineering for two atoms, and then demonstrate the freezing of the magnetization on an initially magnetized 2D array. Finally, we explore the dynamics of 1D domain wall systems with both periodic and open boundary conditions. We systematically compare our data with numerical simulations and assess the residual limitations of the technique as well as routes for improvements. The geometrical versatility of the platform, combined with the flexibility of the simulated Hamiltonians, opens exciting prospects in the field of quantum simulation, quantum information processing and quantum sensing.