Glass-to-metal (GTM) seals present significant challenges due to residual stress (RS) in engineering applications. While previous studies have focused primarily on analyzing the final RS distribution, this work uniquely explores the formation and entrapment of stress during the cooling process, which has been largely overlooked. By investigating cooling-induced changes in glass properties, it reveals the pivotal role of glass solidification and the intricate interplay between thermal dynamics and mechanical properties in shaping stress distribution within GTM seals. Using a combination of photoluminescence spectroscopy and layer-by-layer polish grinding methods, five distinct solidification zones were identified and investigated: primary, secondary, bottom interference, top interference, and final. These zones exhibit different stress profiles because of the disparities in solidification rates and glass transitions, which are affected by the thermal properties of the contacting materials and their heat transfer dynamics. A notable observation from the analysis of the stress distribution along the