You can use the pre_post_update
hook to get the new value before the post is saved. This way you can check if the value has changed (old value is still in the database at this point) and do your magic.
See https://developer.wordpress.org/reference/hooks/pre_post_update/