Best answer: Take it to Apple. The glass back on the iPhone 8 and iPhone 8 Plus is extremely difficult to remove and replace, and if you attempt it, you'll void your warranty (if you have one) and most likely cause more damage to your phone.
Solid construction makes for repair headaches
Since the very first iPhone launched, Apple has always made its hardware hard to get into and repair yourself, and the iPhone 8 and iPhone 8 Plus are no different.
The glass back on the iPhone 8 and iPhone 8 Plus is held to the frame and the internal hardware with a strong epoxy, meaning it's essentially fused with the inside of the phone. It's not a simple matter of prying the glass back off the phone; you have to dissolve the epoxy either using extreme heat or extreme cold.
Apple's technicians will do it best
While you could potentially find a third-party repair shop willing to do fix the glass back, there's no guarantee that a repair shop will be able to do it safely, and even if they do, it will void any warranty (both standard and AppleCare+) if you have it.
Apple technicians have the proper tools, knowledge, and skills to fix your phone. Plus, you won't void any warranties.
What will the repair cost you?
If you have AppleCare+, repairing the back glass on the iPhone 8 and the iPhone 8 Plus will cost you only $29; however, it gets significantly more expensive with AppleCare+. If you didn't (or don't) spring for the extra warranty, it would cost you $149 to replace the back glass on the iPhone 8 and $169 for the iPhone 8 Plus.
Don't attempt the repair yourself
The popular YouTube channel, JerryRigEverything, makes a living tearing down phones, opening them up, and showing people how to replace parts, batteries, and other hardware. Even with his knowledge and experience, he had to go through some extreme measures to replace the glass back on his iPhone 8 and iPhone 8 Plus.