iPhone 8 Camera Replacement Cost?

I’ve had an issue with my phone camera not focusing properly and a large consistent blurry patch, whether taking pictures or video. I think the camera likely needs replacement. I contacted Apple but they were not able to provide an approximate cost for replacing the camera. It is difficult for me to get to the Apple store and I’m trying to figure out if it’s worth doing this or if I should purchase a new phone (probably iPhone XR). Does anyone know what the camera replacement would likely cost?

Thank you