I sent an email to support and they helped my solve the issue.
If anyone is in the same situation as me, here is the guide they advised me to follow:
This seems to be a rare error that we haven’t yet nailed down a pattern for.
It seems like something went wrong with your data storage for sync cache.
First, make sure you have enough free space on your disk drive.
If you do have enough space, restart the app and try to Sync again.
If restarting the app does not work, you may have to wipe the indexedDB folder in Obsidian’s appdata folder:
- Uninstall Obsidian from your device. (This will not affect your vault’s settings or files.)
- Head over to this folder and delete everything inside (while Obsidian is closed) and restart the app. (Again, this will not affect your vault’s settings or files, nor will it affect your remote vault.)
- Windows: %appdata%\obsidian\IndexedDB
- Mac: ~/Library/Application Support/obsidian/IndexedDB/
- Linux: ~/.config/obsidian/IndexedDB
Reinstall Obsidian.
Relaunch the vault and try again.This should reset the sync data for all your local vaults and fix up the indexedDB.