Hi jogishbg,
We see you came from Manage your photo and video storage. It seems you're referring specifically to iCloud Photos. We'll be glad to explain how that works.
iCloud Photos isn't meant to save space on your device, necessarily. It's used to store a copy of your photos in iCloud in case something happens to your device, or you want to share the photos with another device using the same Apple ID.
When you turn on Optimized Storage for your Photos library, if there isn’t enough space for your entire photo library on your iPhone, a smaller version of your photos are stored on your device while the full version is stored/synced from iCloud. From Manage your photo and video storage - Apple Support, "When Optimize Storage is turned on, full-resolution photos and videos are stored in iCloud, and, when needed, space-saving copies are stored on your device.”
What's the difference between device storage and iCloud storage? - Apple Support -- When you check the storage space available on your iPhone, that is specific to the device. iCloud storage is tracked separately.
We hope that clears things up.
Cheers.