Check when a setting has been changed

The update_option hook can use used to run an action when an option value has changed:

function wpse_330204_option_updated( $option_name, $old_value, $new_value ) {
    if ( $option_name === 'name_of_option_you_want_to_check' ) {
        if ( $new_value !== $old_value  ) {
            // Value has changed, run code here.
        }
    }
}
add_action( 'update_option', 'wpse_330204_option_updated', 10, 3 );

Just replace name_of_option_you_want_to_check with the actual name of the option you’re looking for. Usually this will be the same as the name="" attribute of the <input> or <select> element that’s used the change the value.