If you turn on iCloud Photos, all of the photos will sync. However you can reduce the space used on the phone by turning the Optimize Storage option, See the following from Set up and use iCloud Photos - Apple Support
Turn on Optimize Storage
iCloud Photos keeps all your photos and videos in their original, high-resolution version. To save storage space on your device, you can turn on Optimize Storage.
If you turn on Optimize Storage, iCloud Photos automatically manages the size of your library on your device. Your original photos and videos are stored in iCloud and space-saving versions are kept on your device. Your library is optimized only when you need space, starting with the photos and videos you access least. You can download the original photos and videos over Wi-Fi or cellular when you need them.
On your iPhone, iPad, or Apple Vision Pro
- Go to Settings > [your name] > iCloud.
- Tap Photos.
- Choose Optimize [device] Storage.