When you delete a synced online-only file from your device, it is removed from all devices and from the cloud. But you can restore such deleted files and folders by going in your web browser to the recycle bin in your OneDrive or your SharePoint library. Select the file there, then select Restore.聽
If you've deleted a synced file that has been downloaded to your device, after deletion it will also be in your device's recycle bin.