Greetings, Audrius! My name is Arif, and I will assist you today.
For better understanding, do you mean that the OneDrive files that sync to your computer should be removed from your computer but not from the OneDrive web?
If that's the case, please unlink or sign out of your OneDrive account from your computer. Then, try to remove one test file from your computer. Make sure that you're signed in to your OneDrive account on the web and check if the file is removed from your computer and OneDrive web. If the file is removed from your computer and the OneDrive web, it means that OneDrive is not fully unlinked or signed off from your computer. Make sure to fully unlink or sign off from OneDrive on your computer. If not, and if you remove the file from your computer, it will also be removed from the web. If not, it will only be removed from your computer.
for more information, please refer to the below article which is related to your issue:
https://support.microsoft.com/en-us/office/sync...
Warm Regards,
Arif