I had this problem for a couple of years. It was hard to describe to anyone from the technical support team, especially when there is no coordination between MS and Apple. Since there are many people with this problem now, I will share my solution that I came across using many trials and errors, and internet forums.
I am using iMac 21.5 late 2012 macOS 10.15.7 Catalina with an aftermarket SSD 480gb installed by professional service and I believe this problem is not happening on HDD.
For this solution to work, my recommendation for using OneDrive is to not have "files on demand" turned on. It seams that there is a bug in software that reserves the local storage for the files that you think they are just "online", because if you check in Finder, those files are indeed "online". When you check apple storage, this space would be called "other".
My solution is to not use "files on demand", and instead use "choose folders" and manually select which folders do you want to have in cloud, and which folders do you want to be downloaded to the computer. Down side of this is that you don't have a complete visual structure of your folders on one drive, but I think it is worth it. Anytime you could go online and see the structure of the folders, and only keep the important folders locally. If you accidentally checked the box to turn on "files on demand", like I did, then you already have the same problem again, and you should follow these steps to recover your free space.
I have a workaround that had worked for me (as I type this, I am doing these steps again).
1 - Back up all files and programs that you need (the best way is to use Apple Time Machine backup, because I find cumbersome to reinstall all the apps)
2 - Create a bootable installer of macOS How to create a bootable installer for macOS - Apple Support
3 - Follow these instructions to enter "recovery mode" on macOS. Erase and reinstall macOS - Apple Support
This step was difficult for me, because I couldn't enter recovery mode easily. In my experience (trial and error), only the Apple keyboard that came with iMac would respond to "Cmd+R". On the forums I have found that someone presses "option" key (other name for alt, for those who are less familiar) or combo "option+cmd", but this didn't work for me.
If you've followed instruction from the apple website, you'll see it is important to format drive before installing a fresh macOS, otherwise this solution will not work.
4 - After clean install of macOS, just enter Time Machine and restore your files, programs and settings.
5 - Use OneDrive with "files on demand" option turned off
I've used this solution twice. A year ago, I didn't have enough space to update macOS, it was frustrating to solve. Now I am doing it again, because I have accidentally clicked the "files on demand" box when reinstalling OneDrive for some other bug, and it consumed all my storage yet again. In short, OneDrive is more bugy on macs than dropbox in my experience. To be fair, they have improved significantly over the years, but unfortunately they didn't solved this particular problem.