You can test your webcam using online tools or programs that come with Windows 10 or your Mac computer.
If your iPhone camera won't work, you may be able to easily solve it. Here are some quick fixes to try before contacting Apple.