Hi Mike, you don't have to replace the whole back of the phone. Unfortunately iFixit doesn't currently sell just the camera glass but a few google searches will tell you how to fix it and where to purchase one.
I hope this helps.
https://www.youtube.com/watch?v=adZcxqgw0Xo
https://www.ebay.com/p/Rear-Back-Camera-Glass-Lens-Replacement-for-Samsung-Galaxy-S8-S8-Plus/2149921688?iid=232428839414&_trkparms=aid%3D555018%26algo%3DPL.SIM%26ao%3D2%26asc%3D20131003132420%26meid%3D0695b3a180944758a15b94c8cbe760f1%26pid%3D100005%26rk%3D1%26rkt%3D6%26sd%3D232428840893&_trksid=p2047675.c100005.m1851