There are of course many ways to approach how to detect if somebody changed a value in a field and set a flag to know if something needs to be "saved". However, it can get complex if you are doing this for many MANY fields or also for a gallery of items where changes could be made to many of them at once.
This is an example of several ways to approach the problem so you can have some standardized code to make updates back to your datasource much easier and more efficient (and not throw errors).