If you haven't lost the local data then the process of moving to different sync target it essentially the same as outlined here:
It is preferred way of moving to another cloud, but you also can copy your Nextcloud joplin folder to OneDrive. Although some tinkering to make it work might be needed.
Also don't forget to make backups regularly but especially before moving.