If you are using iCloud Photo Library, your photos would be both on your phone and on iCloud. Any photo you delete is deleted from both places. If you had the Optimize iPhone Storage option turned on, the photos on your phone may be smaller optimized versions. If that option is on, change it to "Download and Keep Originals" in Settings > iCloud > Photos before turning off iCloud Photo Library. More information in the following:
iCloud Photo Library - Apple Support
Get help with your iCloud Photo Library - Apple Support
If you were not using iCloud Photo Library but do have an iCloud backup from a time when the photos were on your phone, you can restore the backup. Note that it will replace all of the data on your phone (not just photos) with the data from the time of the backup. See: iCloud: Restore or set up your iOS device from iCloud