Preprocess submitted data

If I got your question right then maybe you could try using the update_option action, which according to the docs “Fires immediately before an option value is updated.”. It gets option, old value and new value as parameters. https://developer.wordpress.org/reference/hooks/update_option/

The accepted answer here, Hook if somebody saves plugin options?, might also be relevant for you.

If you feel adventurous, you could add a custom sanitize callback to register_setting and use it to do some funky stuff with the setting value. But this might be a little unorthodox way.

Personally I’ve found out that digging into the WP source code on trac is also a good way to find useful actions and filters for your custom functions. In this case for example the option.php https://core.trac.wordpress.org/browser/tags/5.1.1/src/wp-includes/option.php