iPhone 7 has magnetic area next to flashlight I put my phone down on a table before where I had some nails on and has stuck to my phone.
Does anyone with an iPhone 7 and if so can they see if their phone has a magnet next to the flashlight on the back of the device?
All Apple cameras that have motors in them are magnetic.

https://support.apple.com/en-us/HT208747

The permanent magnets are how battery power runs the image stabilization and focus mechanisms. Look for OIS and AF in the documentation to learn more.