Direct visualization of ultrafast lattice ordering via resonant electron-phonon coupling in 2D hybrid perovskites