For this guide I will be using Google Drive because it is the one I use and I know that it works but you can try with a different cloud storage. https://www.google.com/drive/download/backup-and-sync
This first option is to set the Minecraft directory to your drive folder to sync between computers.
Change the Game Directory to your Google Drive folder in the Launch Options.
Now you want to copy these files and folders from the previous Game Directory to the new one in your Google Drive folder.
The second option is to set Backup and Sync from Google to continuously backup your Minecraft folder to keep a backup of your worlds.
Go into the Backup and Sync preferences and go to choose folder.
Navigate to the .minecraft folder and select that folder.
The creator of this guide has not included tools