That’s why there’s a mesh over the window of a microwave. The holes in the mesh are too small for microwaves to pass through. But visible light, with a much shorter wavelength, can go through freely. So you get to watch your food cook without melting your face off.