Yes, if all your photos have been synced with iCloud Photos to iCloud, you can set up the new Mac to sync with iCloud Photos as well, once you have installed the system.
- On your new Mac launch the Photos.app while holding down the options key ⌥ ,and when prompted select to create a new Photos Library.
- When Photos opens, go to the main menu bar and open the menu Photos > Settings.
- Click the first tab General and make sure, that "use as System Photos Library" is dimmed and the new library is already the System Photos Library. If not click "use as System Photos Library", to make the new library the System Photos Library.
- Click the second tab and enable iCloud Photos.
Close the Settings and wait for the photos to download from iCloud. If your library is large it may take several days. But it will be faster than transferring the library from the old Mac to the New Mac.
There is one draw-back by downloading from iCloud instead of transferring the Photos Library: iCloud Photos does not store the projects, so you will have to recreate the slideshows and other projects on the new Mac. And some of the the named faces may be missing, the faces you have marked manually. Otherwise it will be the fastest way to transfer your library.