In Windows, by default, Microsoft tools put projects in ~/source/repos, which OneDrive, in turn, by default won't touch so they'll be lost if the SSD fail and they're not in git.
However, OneDrive doesn't seem to even know how to handle source files (it doesn't even attempt to honor the gitignore), so rebuilding a project in folders covered by OneDrive results in flurries of temporary files being uploaded/updated to the cloud, hogging the bandwidth, with a bonus of locking files, crashing builds, or even reverting changes silently.
One would think backup tools, even if primarily for normal users are still literally made by programmers, at least consider the use case of programmers instead of just ignoring them entirely.
OneDrive, Dropbox etc are not backup tools, they're file sync tools. This really should be common knowledge.