If your iCloud storage is full, you can upgrade from the 50 GB plan to the 200 GB plan.. it's only another $2/ month
Manage your iCloud storage - Apple Support
Buy more iCloud storage - Apple Support
If your iPhone storage is also full, you should understand that buying iCloud storage does not expand the capacity of your iPhone.
How to check the storage on your iPhone, iPad, and iPod touch - Apple Support
Here are some links you can review to get a better understanding of storage
About storage on your device and in iCloud - Apple Support
iCloud Deconstructed - Apple Community
If your iPhone storage is mostly full of photos, you can use iCloud Photos and select Optimize Storage to save some space on your phone
Set up and use iCloud Photos - Apple Support
Or you can offload the pictures and store them elsewhere
Transfer photos and videos from your iPhone, iPad, or iPod touch - Apple Support
If you find that the 'other' category on your iPhone is high
Clear Other storage on your iPhone or iPad - Apple Support
if you have trouble updating because a lack of storage
If you need more space for an update - Apple Support
Update your iPhone, iPad, or iPod touch - Apple Support