Astrochemistry serves as a valuable probe of the physical conditions within star-forming molecular clouds. The molecular composition of these clouds evolves throughout the stages of star formation, becoming denser until stars ultimately form. The surrounding environment, influenced by existing or dead stars, introduces factors such as shocks, ultraviolet (UV) radiation, and cosmic rays, which further modify the chemical makeup. Over the past decade, the Atacama Large Millimeter/submillimeter Array (ALMA) has significantly enhanced our understanding of both cold and warm gas across various stages of star formation, utilizing large surveys to analyze molecular abundances in the gas phase for both Galactic and extragalactic sources. Recently, the James Webb Space Telescope (JWST) has begun to investigate the ice phase and hot gas. This review presents recent advancements in observational findings alongside theoretical developments, while also discussing the prospects for next-generation telescopes, including the next generation Very Large Array (ngVLA) and the Square Kilometre Array (SKA).