Wormholes we understand. How we're not seeing Andromeda through a wormhole we also understand.
First, if we were seeing the light through a wormhole, the measured distance would be the distance to the wormhole + distance from wormhole to Andromeda. A wormhole "skylight" doesn't help in that regard: Light still has to travel about 2.5 million years.
Second, if we were seeing the light through a wormhole skylight, the view would shift as the earth moves in its orbit. Next time you're under a real skylight that's clear, look up and move from one side of the room to the other. If you have a car with a sunroof, you can do the same with it. Notice how the view changes.
Third, if there's a wormhole skylight hanging around not far from the solar system, the observed angle as observed from earth is going to shift, allowing a calculation of distance. It's just like using an old fashioned transit to calculate the distance across a river using two observation points and the same target. You can even do it with a Brunton-type pocket transit held in your hand and a long steel tape. Andromeda is so far away the angles are so small that you can't do that, or couldn't, circa early 20th century.
Fourth, we see the entire galaxy, which isn't a point of light in the sky. If you live outside of a city or town, find a star map online, and on a clear night when the constellation Andromeda is visible, look in the area of the galaxy. You might have to use adverted vision, but it's possible to see a faint, fuzzy, glowing patch without any magnification. That's the galaxy. Note the size of it. Now consider how far away a wormhole would have to be from Andromeda to take in the entire view. That or it's huge.
Fifth, consider the size necessary for a wormhole not to show a parallax, a shifting view , and to take in the entire view of the galaxy. All of a sudden we're not talking about a wormhole anymore. We would have to have something much bigger.
Sixth, the distance to Andromeda is measured / first measured by noting the apparent magnitude of Cepheid stars, which can be calculated based on their cycle of brightness fluctuation, and figuring how far away they are based on the difference. Even if you were right, the light we see is traveling about 2.5 million light years. If there's a wormhole skylight involved, that would mean Andromeda is
further away than thought.
And... I've just wasted my time typing this, didn't I?