My tip;
activate sync at the end of your writing session
Also, open Obsidian settings>core plugins>file recovery
and activate the toggle to recover recent files.
A good practice is to backup your most valuable data from time to time, on an external storage like hdds or USB sticks.
There are multiple tools to sync, like for example, Syncthing or just from terminal rsync. Both tools are free.