One possibility -- the photos on your phone may be optimized versions that occupy less space. That option is described in the excerpt below from iCloud Photo Library - Apple Support
iCloud Photo Library keeps all of your photos and videos in their original, high-resolution version. You can save space on your device when you turn on Optimize Storage.
On your iPhone, iPad, or iPod touch:
- Tap Settings > [your name] > iCloud. If you’re using iOS 10.2 or earlier, tap Settings > iCloud.
- Tap Photos.
- Choose Optimize [device] Storage.
You can turn that off by selecting "Download and keep originals" instead of "Optimize iPhone Storage."