I would try downloading a 3rd party camera app from Google Play. If that camera app cannot open the camera, try booting into Safe Mode. Try opening the camera again. If it doesn't, it looks more likely to be a hardware issue. But since this is a new phone and you probably don't have a lot saved there yet, I'd back everything up and do a factory reset (remember, this wipes ALL data from your internal memory, including pictures, media files, apps... everything).
If that doesn't fix it, then the camera module is probably faulty and needs replacement. It can range from a simple loose connector to a burned out sensor.