>>13567391The glass breaks because it is hard, i.e. the material cannot deform to relieve the stress put on the system and the material breaks.
The metal is soft and thus is able to deform under pressure, allowing the material to remain whole.
In the glass the energy of your punch is relieved through fracture and thus no counter-force is put on your hand. In steel all the energy of your hand is put into the counter-force which hurts your hand.