it will depend on the Settings you have used with iCloud Photos. (Use iCloud Photos on iPhone - Apple Support)
If the settingc"Settings > [your name] > iCloud > Photos: Optimize iPhone Storage" had been enabled, many of your photos may only be in iCloud, and you need to recover them. "Optimize iPhone Storage" is the default.
Before turning off iCloud, ensure that "Settings > [your name] > iCloud > Photos: Download and Keep Originals" is enabled. Give Photos time to download all photos back to your iPhone.
If you try to switch to "Download and Keep Originals", you may see a warning, that you do not have enough free storage on your iPhone to store all originals. It is easy to use more storage in iCloud than you have on your iPhone.
On a computer you can download the iCloud photos directly from the web page www.icloud.com, if you sign in with your AppleID and launch the Photos.app there. But you have to click each photo individually to to download it. On a Mac you can hold down the ⌘ key while clicking each photo and then download them all together.