Probing the terrestrial planet-forming ingredients with JWST