iCloud is only 5gb for free .. even if your phone is a 16gb phone then you have more pics and videos than 5gb. So you get a iCloud is out of storage message. You can upgrade your iCloud storage in settings to 50gb for 99 cents a month.
That or your message is registering phone memory in that case go in settings and see what is taking up memory and delete accordingly.