Γυαλί is "glass", meaning the material used to make objects of glass. So you can have bottles, drinking glasses, souvenirs, all made from γυαλί.
Τζάμι is the flat screen made from glass material (γυαλί), used for windows and doors.
So τζάμι is one of the products made from γυαλί.
However many times we loosely use both words (γυαλί and τζάμι) to refer to glass material.