If the measurement you are using to control the relay is likely to move back and forth close to the activation setpoint, you can set a hysteresis that prevents the relay switching on and off too frequently.
When hysteresis is used, the relay activates at the defined limit, but does not switch off immediately when the measurement moves back to the other side of the activation limit. Instead, with hysteresis, the relay remains active until the measurement crosses the relay activation/deactivation limit and the additional buffer value.