iCloud Photos Optimize Storage option can reduce the space needed if your drive is low on storage. To reduce the space needed for Photos, see the following from Set up and use iCloud Photos - Apple Support
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.
Another option: Move your Photos library to save space on your Mac - Apple Support