Yes, if you turn off iCloud Photos, you will lose the photos that are stored in iCloud. However, you can always download them from iCloud before turning it off. To do that, go to the iCloud website, select Photos, and download the photos you want to keep. Additionally, make sure to back up your photos to a local drive so you have a copy even if you turn off iCloud Photos.