Some pictures, transferred from a computer perhaps by iTunes, and usually the ones in an Album called "From My Mac," were considered to be on the phone only temporarily. These were usually smaller copies for viewing on the phone while the originals stayed on the computer. These pictures might disappear with the next transfer from the computer, and in Photos they couldn't be edited or even deleted-- the computer had to be used for that. So some operations produce a warning about those being at risk. If you’re missing pictures that were transferred from a computer, then you should look on the computer for the originals.
A remote possibility is that, before you turned on iCloud Photos, these pictures were included in an iCloud backup. If you had Settings>Apple ID>iCloud Backup turned on, then you may be able to recover data, if the backup hasn't been replaced. You should look here:
Restore your iPhone, iPad, or iPod touch from a backup - Apple Support
“Restore” is what you do when you buy a new phone, so this safety, if you have it set, requires you to erase everything on your phone and replace it with the backup. I'm afraid that I don't know if those backups include "From My Mac" pictures, since they were considered to be on the phone temporarily, so this is a pretty iffy suggestion. Alternatively, these pictures may have been included in a computer backup if you did that.
Unfortunately, if you don't keep your own backups to an external drive, there really isn't any place else to look.