I went thru this already. If you have the iCloud Photo Library on you’re good.
I had 20 gigs on my phone. The reason I had so much was a combination of the thumbnails that take up some space and the photos and videos that were taken for the year I had the phone.
Now I only have 4.8 gigs since I upped to the iPhone 8. Which is mostly the thumbnails for the previews low res versions as Apple told me.
I kinda figured out this on my own by....
1-signing out of iCloud on my iPhone 7 before signing in to my new iPhone 8
2-going to a brand new iPad that I recently got that I was able to see all my photos I went years back too. Also there was the same type of storage amount on the iPad at 4.5 gigs at that time and also I never took a picture with the iPad so I knew I was good as far as that was the thumbnails space took
3-I signed in to my new iPhone 8 and then I got the same 4.5 gigs once it populated with my iCloud sign in
4-I wiped out my iPhone 7
Good luck. Let me know how you make out