Hi @john john ,
1.The online files in libraries will not be affected after you cancel the synchronization and delete the local copies.
2. You did the right operation to set the OneDrive.
By the way, OneDrive will automatically remove the online files after canceling the synchronization and remain the locally available files, so if your synced files are all online, your operation to delete the local copies is unnecessary.
Per my test, synchronizing:
After canceling the sync, only the local files are left, and the online files in the folder are also removed.
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.