Expansion of the universe plays a big role in your confusion. There is also a big difference between how far a photon travelled to reach us (a measurement of time) vs the distance to where the galaxy that emitted it is right now (a matter of distance). The observable universe does indeed have a cosmic horizon of about…