To calculate the age of our universe, astronomers have used two main tools
Look for old stuff
Based on how far an object is, astronomers can get a rough idea of how old it is. Researchers have been able to find clusters of stars as old as 13.2 billions years.
As the universe expands, it also stretches the light waves travelling through it. If a star is moving away from the earth, its light will be stretched and have a longer wavelength by the time it gets to us. That is called redshifts. By doing some math, astronomers can get a rough idea of how far and how old a star is.
This just tells us that the universe has to be at least 13.2 billion years old.
Looking at the expansion of the universe itself
To refine the measurement, astronomers also use measurements about the expansion of the universe itself.
We have known the universe was expanding since the late 1920s. But the understanding how it is expanding is what especially useful.
Knowing how fast it is happening and how that speed is changing really allows researchers to work backwards from right now, to find out exactly when the universe was a tiny seed of everything.
Two major discoveries have helped us understand this expansion. The first was type Ia supernova. In 2011, a team of scientists won a nobel prize for using them to prove that the universe is expansion is getting faster.
These supernova are extremely bright, and their brightness are all pretty uniform, so one of them will look a lot like another. This makes them really good for calculating distances. Astronomers call them standard candles.
Since we know what their brightness should be at any given distance, they are easy to use in measurements.
Astronomers noticed that the redshift for these supernovas was a lot smaller than they should have been for galaxies so far away. That means sometime after the supernova emitted their light, they actually get farther from the earth than expected.
That could only be explained by a universe that is expanding faster as the years go on. It has helped us understand when the big bang happened.
Astronomers used to assume a constant rate of expansion. So if you are working backwards, you will get a universe that is way too young. Or, if you picked a bad standard candle, you get inaccurate measurements.
Hubble's original calculation from 1920's used a type of star called a cepheid variable as the standard candle. That suggested the universe was about 2 billion years old, which is definitely not right, because by then, geologists have already found rocks on earth which is 3 billion years old. The reason is because Hubble has observed Type I Cepheids, but wrongly used the period-luminosity relation from Type II Ceipheids.
The luminosity that Hubble used is differed by two orders of magnitude compared with the correct value. Later, Water Baade has used the correct value of luminosity and obtained that the age of the universe is 3.6 billion years.
The other way we have figured out the rate of expansion is the cosmic microwave background. It is the energetic glow left over from the big bang. The temperature of the cosmic microwave background is 2.7K/-270C/-454F.
But it is not 2.7 K everywhere you look. It has tiny temperature fluctuations which are super useful to us. Those temperature variations can tell us about the movement of objects and the densities of gasses in the universe.
The CMB appears as a faint background noise. The glow is nearly uniform in all directions. And is not associated with any star, galaxy, or other objects. The variations are fairly uniform distributed like the pattern of a hot gas that has expanded to the current size of the universe.
Along with type Ia supernovas, these studies have allowed us to get a much more precise picture of how the universe has been growing since it began. That gives us accurate estimates of how the universe has been growing since it began. Then we obtain the precise number of the age of the universe, 13.8 billion years.