You can put some types of glass in the freezer although some glass types may break or shatter when frozen, especially if you freeze liquids or foods with liquids in glass jars or glass that is sealed as the pressure from the frozen liquid that freezes and expands can shatter the glass.
It is safe to put some types of glass in the freezer although not all glass is freezer safe.
When placing glass in the freezer you should use glass that is made to withstand the cold temperatures of the freezer and also avoid any sudden temperature changes such as from going from the oven to the freezer which can cause the glass to break or shatter.
Borosilicate glass as well as tempered glass are often safe for freezing as they are more resistant to thermal shock which is the sudden changes in temperatures.
You should avoid using regular glass in the freezer, especially glass that has a curved shoulder as these types of glass are more prone to cracking in the freezer.
Also when you freeze liquid in glass you should always leave at least an inch of headspace in the glass container to allow for expansion as the liquid freezes.
overfilling the glass and freezing it can cause the glass to crack as the frozen liquid expands.
And avoid placing hot or very warm items directly into the freezer when in glass as they can crack or break.
Allow them to cool down to room temperature before placing them in the glass in the freezer.
And avoid over tightening of the lids on glass containers when you store them in the freezer as it can create pressure and lead to cracking.
Glass containers and glass that is freezer safe is often labeled as freezer safe or microwave safe.
Pyrex is often good and okay to freeze in as well but you should not go from hot to cold suddenly or those can also crack.