I have no idea why you're getting downvoted. The icloud-photos-downloader is an amazing tool. I run it from a monthly cronjob to have a local backup in case icloud iexplodes.
Local photo library is a folder, disguised as a package. One of the folders store all the originals on the device. Copy that folder, and you're good to go. You can also get the full folder hierarchy, if you wish.
If you enable iCloud for the photo library, and even if you select store originals, I have found that Photos still offloads some pictures. It’s just not guaranteed.
I really wish Apple had a complete export button, similar to google takeout. Or at least a good CLI tool to get the original images one by one.
I rsync images out of Apple’s weird file structure that’s in the bundle. It’s horrible, but with ‘download originals’ enabled it works well. It’s particularly frustrating with large libraries as they occupy nearly all an SSD. For this reason I do it all on a VM that’s on a Synology.