In Photos>Settings choose iCloud and "Optimize Mac Storage." This will keep smaller copies on your computer so that you can see them quickly, but the full sized images will be stored in iCloud.com where you can also see them in a browser. It will take some days, probably, for all the pictures in your Photos Library to upload to iCloud. The library on your Mac will get smaller as you need more space. If you want to edit or print your pictures, Photos will download the full sized images without you really noticing.
There's more detailed information here:
Set up and use iCloud Photos - Apple Support