Many things can cause corruption, unfortunately, so it is hard to name a cause without a lot more information.
What Obsidian version are you using? What OS? Plugins? Are there other services (e.g., file automations, backup services, other editing apps, collaboration tools) working on the files? Etc.
Reflect on your set up and think if anything might be automatically changing files in the background.
You may want to try using Safe Mode for a while (e.g., disabling all community plugins). If it doesn’t happen again, then you know one of those is at fault.