The problem that had to be solved to create photography was finding a way to make the photographs permanent. Early cameras used various means of creating the initial image, but over time, the images were degraded because no one knew how to keep these elements from degrading. Another issue that had to be solved, which could be just as important in making sure the photograph was invented, was making sure the photograph printed properly.
The first camera ever recorded - the camera obscura - created photographs that were upside down and backwards, but that couldn’t be viewed outside their dark room without degradation. Once these issues were solved, photography became a permanent thing that we could take advantage of to capture important moments - and to create all the other kinds of cameras we have today.