To avoid downloading every file from a OneDrive, OneDrive for Business or SharePoint library to your computer, you can turn on Files On-Demand in the OneDrive app to only download files as you use them.
This can free up disk space and reduce the time it takes for OneDrive to find and modify content between your computer and cloud storage.
To check and turn on Files On-Demand in OneDrive:
Select the white or blue OneDrive cloud icon in the Windows notification area.
Note: If you’re on Windows 10, your computer already has the OneDrive desktop app on it, but you'll need to turn on Files On-Demand in OneDrive settings.
Select the Settings tab and ensure Save space and download files as you use them is checked.