The Interstellar Medium (ISM) harbours processes that play key roles in the evolution of galaxies. It hosts the signatures of the many feedback processes induced by star formation, including the metal enrichment (metallicity). This work aims to study the structure of the different gas and dust phases in star-forming regions, the cooling and heating processes at play, and how they are affected by the metallicity.We focus on the Large and Small Magellanic Clouds (LMC and SMC), two dwarf satellites of the Milky Way: they have sub-solar metallicities, and their proximity allows us to have spatially detailed observations of star-forming regions. We complete those observations with the Dwarf Galaxy Sample (DGS) observations, that target 48 mostly...