If your iPhone is stuck on an Apple logo there are a couple of steps you can take to try and get the device to boot up.
You can try to force restart your iPhone by pressing and holding the sleep/wake button and home button at the same time until the Apple logo shows.
On an iPhone 7 you force restart the device by pressing and holding the volume down and home button at the same time.
You can try force restarting the iPhone while connected to power, but it rarely works.
I have also seen where people have waited till the device dies, then charge the device and attempt to power it on. (again this works rarely.)
If these steps don't work to power your iPhone on then I'm afraid that there is no way to back up your device at this point.
You can use the following article to help with troubleshooting the Apple logo issue, which at this point would mean trying to restore the device and resulting in loss of data if you have no backup in iTunes or iCloud.
[ Register or Signin to view external links. ]
If you are still not able to power on your device you may need a repair. [ Register or Signin to view external links. ]
I hope this helps.