First we need to realize that when things get really small (like photons) they stop behaving the same way as larger objects (like a football). We have to imagine that the quantum world has different rules to ours (even though it is all really the same).
It’s not that a photon can be in two places at once, it’s that a photon is everywhere at once. This way of thinking states the particle travels every possible route in the universe to get the their final destination . So it really isn’t at two places at the same time. The reason this works is it’s impossible to prove where the particle is without changing the experiment in a way where the results also change. This is also where the idea of multiple universes comes from. One day we will understand more about this, but at the moment we do not know for sure.