Frequent ON OFF in SSR
You need to implement hysteresis. Set two temperature points around set_temp. One a little higher to be a limit for turning the heater off and a one a little lower then set_temp to turn the heater on.

You only need to change your if else condition a little

if (current_temp &lt; set_temp - HYST_VALUE) {
  digitalWrite(ssr_u, HIGH);
} else if (current_temp &gt; set_temp + HYST_VALUE) {
  digitalWrite(ssr_u, LOW);
}


you could start with

int const HYST_VALUE = 1;