You are correct that the concept of time is relative, according to the theory of general relativity proposed by Albert Einstein. Time can be experienced differently depending on various factors such as gravity, velocity, and the reference frame of an observer. However, when scientists refer to the age of the universe as 13.8 billion years, they are typically referring to the age measured in our reference frame, known as the cosmic time.
The age of the universe is estimated based on a variety of observational data, including the measurements of the cosmic microwave background radiation, the redshift of distant galaxies, and the observations of the rate of expansion of the universe. These measurements collectively provide evidence that the universe began approximately 13.8 billion years ago in our reference frame.
While it is true that observers in different locations or moving at different velocities may experience time differently, the age of the universe is generally considered from the perspective of a "cosmological time" that tries to account for the average expansion of the universe. In this framework, the age of 13.8 billion years represents the elapsed time since the Big Bang as measured by observers in a relatively stationary reference frame with respect to the large-scale structure of the universe.
It is worth noting that the concept of the universe having a specific age can be a simplification. In cosmology, there are also other measures of time, such as conformal time or proper time, which can have different interpretations and implications. These measures can be useful in specific contexts, but when discussing the age of the universe, the commonly referenced value is approximately 13.8 billion years in our cosmic time.