I got caught out by exactly this, and I'm not exactly tech illiterate. what made it even more annoying is by the time I'd realised what had happened, it was practically impossible to get the files back out of OneDrive (since I decided that this was enough Windows for me, and went back to Linux), since the webui does NOT handle downloading lots of small files well, and you just end up getting a partially complete zip file. I gave up in the end as nothing in there was particularly important. This is an incredibly annoying default.
Oh and another fun thing! I eventually just emptied the OneDrive so Microsoft would stop bothering me. This was maybe six months ago or so. Microsoft confirms I am storing nothing there. Just a week or two ago I got yet another email begging for money because my OneDrive was apparently full. It was a genuine email, I went as far as checking the headers for SPF/DKIM. When I signed into onedrive, still empty!
I wouldn't use the webui for that. Getting rid of onedrive in favor for a self-hosted nextcloud, I used the native client to download all the files on the machine and then moved them out. This also removed them from onedrive after acknowledging the "A lot of files have been deleted from your onedrive account" warning. Actually deleting the onedrive application was also not as straight-forward as some other users may want you to believe. Even now, I'm not sure it won't just pop-up one day once again.
I wonder if rclone would have behaved any better than the web UI.
I too have seen onedrive do this to people who aren't super-heavy computer users. Onedrive is a menace.
I had same exact experience with macOS and iCloud. macOS by default enables offloading Documents to cloud, transparently. Problem is if you try to get those files back to store them offline, it gets very tricky very quickly with ambiguous verbiage and lengthy process that you never actually know status of. I ended up losing some files as a result, which came as a total shock to me. I was already in the process of moving back to Linux (hence downloading of the Documents) and this was final straw.