Synthetic quantum systems with interacting constituents play an important role in quantum information processing and in explaining fundamental phenomena in many-body physics. Following impressive advances in cooling and trapping techniques, ensembles of ultracold polar molecules have emerged as a promising platform that combines several advantageous properties1-11. These include a large set of internal states with long coherence times12-17 and long-range, anisotropic interactions. These features could enable the exploration of intriguing phases of correlated quantum matter, such as topological superfluids18, quantum spin liquids19, fractional Chern insulators20 and quantum magnets21,22. Probing correlations in these phases is crucial to understanding their properties, necessitating the development of new experimental techniques. Here we use quantum gas microscopy23 to measure the site-resolved dynamics of quantum correlations of polar 23Na87Rb molecules confined in a two-dimensional optical lattice. By using two rotational states of the molecules, we realize a spin-1/2 system with dipolar interactions between particles, producing a quantum spin-exchange model21,22,24,25. We study the evolution of correlations during the thermalization process of an out-of-equilibrium spin system for both spatially isotropic and anisotropic interactions. Furthermore, we examine the correlation dynamics of a spin-anisotropic Heisenberg model engineered from the native spin-exchange model by using periodic microwave pulses26-28. These experiments push the frontier of probing and controlling interacting systems of ultracold molecules, with prospects for exploring new regimes of quantum matter and characterizing entangled states that are useful for quantum computation29,30 and metrology31.