How can i change a field value when the document got any change

I have a field isupdated default value is 1 whenever any changes happen in the doctype i want to change the value to 0 how is it possible

Use the on_update controller hook Controllers