OneDrive, iCloud, Google Drive and Dropbox sync your files. That’s not the same as backing them up. Here’s the crucial difference.
This one catches people out constantly. “It’s all in OneDrive, I’m fine.” You might not be.
Sync services mirror your files across devices in real time. Delete a file — or let ransomware encrypt it — and the service faithfully copies that change everywhere, including to the “safe” copy. There’s no separate, untouched version to restore from.
Sync is great for convenience. It is not your safety net. Add a proper backup (and ideally a local one too) and then you’re actually covered.