Use the SharePoint Online Management Shell with the Set-SPOSite cmdlet.
Set-SPOSite -Identity -BlockDownloadPolicy $true . block download policy for sharepoint sites and onedrive
Users see a notification banner stating, "Your organization doesn't allow you to download, print, or sync from this site". Use the SharePoint Online Management Shell with the
Users cannot download, print, or sync files to the local OneDrive client. block download policy for sharepoint sites and onedrive
The policy also prevents moving files to other SharePoint sites via Power Automate or Quick Steps. Methods for Implementing Block Download
Content cannot be accessed via Microsoft Office desktop apps, as these apps typically download temporary local copies.