The usual reason for the syncing pausing is to save battery power. Is your iPhone connected to a charger, when the iCloud Photos syncing is stopping? If not, connect the iPhone to the charger and tap the "resume" button in the status bar when viewing the syncing status in Photos Tap your avatar in Photos to see the status of the iCloud syncing).
Another possible reason for the iCloud Photos syncing not finishing may be lack of storage on your device or in iCloud. Also incompatible items in your Photos Library can cause the syncing to hang. Does your Photos Library contain items that have not been taken with the iPhone camera but have been saved to Photos? Either items shared with you or downloaded from the web? If yes, check the format of these items. When in doubt remove them from Photos and convert them to JPEGs or HEIC and videos to mp4 or HEVC.