Yes, you can. How is a very difficult question to answer.
Broadly, as with developing any embedded electronic project, you first have to correctly identify each part, and obtain its technical specification / manual from the manufacturer. This will tell you what each part does and how to assemble and connect them all together. The second part is even more difficult - if the manufacturer doesn't provide a ready made software (or atleast a device driver or template software that you can customize), you will have to write the software / program yourself to use the hardware correctly. (in iPhone, this part is handled by iOS and the camera app.)
So if you are familiar with electronics and embedded technology, and embedded programming, you should be able to do this.
Realistically, it is a very diffult task and will take a lot of time and new skillsets. It would be better to start with a smaller and easier electronic project before trying this.
Go for it if you are interested in patiently learning these skills. Even if you fail, you will still learn a lot. (Take inspiration from Alyssa, a young woman, student and hacker who is progressing on reverse engineering Apple's GPU in its new ARM processors, to create a linux driver for it).
The knowledgeable people at iFixit may be able to help you identify the parts, and even obtain the technical schematics on it. You can also ask for more help and advice from the Electrical Engineering Stack Exchange and Reddit Embedded forum.