Basically Microsoft is making it hard to opt out of “Files on Demand” on OneDrive and keep your files on your device. The article gives a work-around, but it is not exactly obvious.
See this explanation:
https://www.macrumors.com/2022/02/03/microsoft-responds-mac-onedrive-criticism/
OneDrive must have updated on my Mac over the last day as the OneDrive behaviour and preferences interface changed as per the article.