Hi @Joao ,
By OOTB, in this case you have to prevent users from downloading files to local. You can achieve this by creating a custom permission level "Edit without Download" to provide edit permissions to users in the SharePoint Online document library without giving them the ability to download the file so that they cannot save the files to local then. See this tutorial: SharePoint Online: How to Allow Edit Permissions but Not Download?
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.