I’ve seen discussions here of people doing this
Solar Panel → Battery Bank → Cameras.
That’s mainly because you can’t rely on the solar to constantly put out enough power, you need a reserve or buffer in between.
You just need to make sure you select a battery bank that supports “pass through” which basically means it can charge and output at the same time. Ideally you also want to find one that doesn’t bounce the output when it loses the input so your cams won’t reboot when the sun goes behind a cloud, etc. If you plan to mount it on the roof then putting it in a weathertight container is necessary too. I’d potentially be a bit concerned with the temperature from the sun up there though, maybe you can find somewhere to shade it or mount it inside and run the cords through a vent or some other access hole to the interior? I guess in that case you wouldn’t need the battery bank or solar panel at all, just use your AC power.
There are discussions around that type of battery bank in this other thread, apparently a fairly unknown Talentcell brand has proven reliable for this type of thing