A backup is always a good idea. Downloading all the pictures from iCloud will work, but it will take a long time!
It sounds like you are using iCloud Photos to sync your Mac and your iPhone-- is that true? Are the pictures on iCloud the same as on the Mac? That would make it easier, since the backup would come from your local library, and it would be way faster. Then you could just duplicate your Library and store it someplace else. Fast and easy!
But to use your Mac's Library, you need to be sure that you have full sized images on your Mac-- Do you have "Download Originals"
checked in Photos>Settings>iCloud? If yes, you're good. If "no," then you need to either do the direct from iCloud download, or you can fix up a library that has all the images on board.
If "Download Originals" has been checked for a long time, then the simplest backup would be to duplicate your current Photos Library (⌘-D) and move that somewhere else, preferably to an external drive (even a thumb drive) that won't suffer loss if your Mac gets run over by a truck, or something. When you duplicate the Library, usually called Photos Library.photoslibrary, you will get a new one called Photos Library copy.photoslibrary that will have all the pictures of the first one and will work just the same in Photos. You can even run it from the external drive-- but not from the thumb drive--they're usually very slow.
If "Download Originals" has not been checked, then some of your pictures in your Mac's Library will be smaller versions that save storage space. To get the full sized images, the best thing to do is to make a new Library, make it your System Library, turn on iCloud and check "Download Originals." Keep the computer plugged in and on with Photos in the background when you can, wait a week, or something, and all the pictures will be automatically downloaded. Then you're back to duplicating the Library.
Even if "Download Originals" has not been checked, you can Export the pictures from Photos to files in folders in Finder, but Photos will have to download some of the incomplete pictures first. So, if the full-sized pictures are not on your Mac, it'll take awhile any way you go.
Well, this turned out to be long! That's partly because we don't know how you're set up. We can help with any of the steps if you need clarification.