How do we know how far away and early in the universe galaxies are?

The James Webb Space Telescope has spotted galaxies further away in the universe than any other instrument before. How can we be sure these early galaxies aren't closer and more recent?

How do we know how far away and early in the universe galaxies are?
The James Webb Space Telescope has spotted galaxies further away in the universe than any other instrument before. How can we be sure these early galaxies aren't closer and more recent?