It's glue. Used to stop things like connectors from vibrating loose.
However there's a commonly used variety of brown glue, that becomes acidic and electrically conductive as it ages. It's a death sentence for electronics when used on PCBs because it corrodes everything after a few years, and also shorts out PCB traces and pads.
Your brown glue doesn't look quite like the death-glue, which is an opaque sh*t-brown color. Yours is kind of translucent.
But I notice it's across pins of what looks like a membrane keypad flex connector. Such keypads tend to use fairly high impedance signals, so some slightly conductive glue might stop it working. I'd advise removing the glue by scraping with the tip of a modelling knife.
Is that a microwave oven controller? Or thermostat? What is it doing wrong?