On both devices go to System Preferences > iCloud > iCloud Drive > Options and see if "Desktop & Documents Folders" is checked (✓). That means both devices are actually sharing the same Desktop folder which is on your iCloud Drive. (This would fit your time frame when you say this began, but I don't believe it is the default, so at some point you would have had to select the specific option.)
In this scenario the Desktop on your device mirrors the Desktop folder on you iCloud Drive. In other words there is a physical copy of the Desktop Folder on both of your devices for speed and in case there is a network problem where iCloud Drive is not available. When you make a change to the Desktop Folder contents on Device A that change is copied to the iCloud Drive copy and then downloaded to Device B. There is an inevitable and unescapable lag or delay in copying the change from Device A to the iCloud Drive and an equally inevitable and unescapable lag or delay in copying the change from the iCloud Drive to Device B. In my experience each link takes a few seconds, but for a large file that can easily stretch to several seconds, even minutes to complete.
There are a number of other conditions that can effect when a change on Device A is reflected on the iCloud Drive and how long the upload and download take. Among the conditions are - in no particular order:
- both devices connected to the internet
- both devices are "awake"
- other activity on either device such as a Time Machine backup in progress
- speed of the internet connection of either device (they do not have to be on the same Local network or even in the same country)
- in light of the number of images involved in your case, how much Swap File memory each of the devices has to use to render all the images (Go to Activity Monitor > the memory tab and see how much Swap is used and what the "Memory Pressure" level is
- the traffic load on your internet service provider's network
- the traffic load on Apple's iCloud servers and are those servers up
Assuming this is the desktop sharing technique you are using and given the fact sometimes the update time is relatively short and the long delays are relatively recent I would posit 3 possible causes of the delay
- A recently added or updated application on one or the other device has a memory leak forcing heavy use of Swap File memory (see item 4 above)
- intermittently slow, or even no internet connection (You can test this with apps such as Speedtest by OOKLA, Internet Speedtest )
- one of your devices has a weak, noisy, or poor WiFi connection to your Local Area Network and thereby to the internet (there are apps such as WiFi Explorer, WiFi Strength Explorer, Air Radar, etc.
- the Apple iCloud servers you are connecting with are have problems (you can check the current status here
- You can force the upload by logging onto your iCloud account in Safari opening iCloud Drive and clicking on the upload icon (a cloud with an upward pointing arrow) and selecting Desktop.
- You can force the download by logging onto iCloud in Safari, clicking on Desktop, selecting the images and clicking on the download arrow.