The growth of galaxies involves a complex interplay between the gravitational accretion of gas into halos, star formation, and feedback processes from active galactic nuclei and supernovae. The inflows and outflows of gas, as well as star formation, determine the gas content and thus the physical properties of the galaxies we observe today. The energy from accretion and feedback has to be dissipated for gas to cool and form stars, closing the feedback cycle. Before the JWST era, the evolution of the cosmic star formation density with redshift showed that at most 5% to 20% of the baryonic content of halos had been converted into stars. However, JWST is now revealing an excess of, sometimes massive, galaxies at z>9, suggesting that the efficiency of star formation could be as high as 60% to 100%. To understand the baryons-to-stars conversion efficiency, the physics of the multiphase, turbulent ISM is a key, because ISM is the fuel for star formation and the buffer in which radiative and mechanical energy is injected and reprocessed. This talk will highlight observations of diffuse and warm molecular gas (100-1000K) in galaxies, with a focus on galaxy interactions and nearby active galaxies. I will show that the modelling of molecular and atomic lines, which quantifies the dissipation rate and excitation of the irradiated and shocked gas, allows us to derive the radiative and mechanical energy budgets of galaxies, and determine in which phase of the gas the kinetic energy is dissipated. JWST data highlight in particular the link between AGN activity and turbulent dissipation, an exciting perspective to address the open question of the regulation of the gas content in galaxies