Wikipedia has a starting point if you’re interested: https://en.wikipedia.org/wiki/Photography_and_the_law
It seems to mostly just be a problem if you’re caught (aka if you’re being obnoxious or using a tripod) or if you try to use the subsequent footage for anything other than private viewing.
In many places you’re allowed to take wide shots where people might be captured incidentally, though not everywhere, as some places don’t allow photos of “copyrighted” buildings and landmarks.