If you don’t do this one thing, you will lose all your edits when your lightroom catalog file gets corrupted.
This is the one setting that I always turn on as soon as I install Adobe Photoshop Lightroom (LR) on any computer: Automatically Write Changes into XMP.
I suggest you do the same, because it has saved me many times. I really don’t know why Adobe sets this to ‘off’ by default. It should always be turned on! Here’s how to turn on