If your storage space on your iPhone is very low, it will stop uploading photos to iCloud.
You will have to free up some space on your iPhone to continue the photo upload to iCloud.
How to check the storage on your iPhone, iPad, and iPod touch - Apple Support
But remember, that you can't delete the photos from your iPhone after they all synced to iCloud, as this would also delete those photos from iCloud Photos.
As iCloud Photos is meant to keep content in sync on all connected devices, you should copy the photos to your computer or an external drive, to back them up.
Transfer photos and videos from your iPhone, iPad, or iPod touch to your Mac or PC - Apple Support
Archive or make copies of the information you store in iCloud - Apple Support