Hello izzatyzulkifli,
It sounds like you have a good chunk left of your built-in storage, so it seems the issue is narrowed down to not having enough storage in iCloud.
Another important thing to keep in mind is that iCloud not only syncs with the photos on your iPhone, but also several other things.
As it's indicating you don't have enough storage to fully accommodate syncing your iPhone with iCloud, the next logical step is to upgrade your iCloud storage. As mentioned earlier, you can upgrade iCloud storage up to 2TB(2000GB). Just in case, here are more details about the different options for iCloud storage: iCloud+ plans and pricing
This link may also help to Manage your iCloud storage.
Take care!