> But, of course, the galaxy isn’t nearly this bright. You need a dark sky to see it, and, even then, it’s a barely visible fuzzy patch of light. In order to appear as bright as in the image above, the Andromeda galaxy would need to be closer. If it were close enough to look so bright, it would appear even bigger on our sky’s dome.
Things closer by do not appear brighter, they merely appear bigger. The Andromeda galaxy will never appear as bright as in that image, not matter how close it is. As things get closer they do, of course, cast more light on us, but that light also comes from a larger solid angle, which means when we look at them, the brightness (per area) remains constant. It's why your computer monitor doesn't look any dimmer as you walk away. It just gets smaller in your field of view.
This breaks down for pointlike objects, like single stars - anything small or far away enough to look like a point to our eye cannot get any smaller, so changes in distance are only apparent as changes in brightness. But as the image demonstrates, the Andromeda galaxy is much, much larger than a pointlike object to the naked eye, and so this does not apply (it doesn't matter that the individual light sources are pointlike stars here - for a galaxy they average out due to density, but even if they didn't, as individual points get brighter the space between them gets larger so it all still cancels out when we look at overall apparent brightness for the whole group).