Why don’t we calculate the average of an entire given population instead of computing confidence interval to estimate the population mean? We compute confidence intervals to estimate the true population mean of either a sample (when population standard deviation is unknown) or an entire population (when population standard deviation is known). But I wonder why, if we are given an entire population, why don't we calculate the average of that population instead of computing confidence interval to estimate the population mean since we already have the entire population? I'm not a Math or Stat major so I apologize if my question does not sound "smart".
 A: If we're able to observe the entire population of interest then that's exactly what we'd do!  In this case we don't require any statistical inference because we directly observe the entire population of interest.  Where statistical inference (including confidence intervals, etc.) comes in is when, for some reason, we are unable to observe the entire population.  Often this is because it is too expensive or inconvenient to sample then entire population, but in some cases it might be completely infeasible.
A: Observed populations are realisations of data-generating processes and we want to compare processes rather than historical fact
In some cases we may have captive populations and really good data capture - for instance we may know the exact hospital stay duration of everyone in several university hospitals who has been admitted for a specific condition over 2021-2022. There may be sampling discussions around the consistency of the definitions (e.g. around condition, admitted etc. and whether there are different distributions over time (one hospital may do more emergency admissions at weekends, one might have had fewer admissions during a more strained COVID-related period)) but let's set those aside for now.
We can say what the average stay duration for each hospital was exactly, but if we want to say "people in hospital A were hospitalised for longer and not just by random chance" we actually want to compare the data generating processes. We might start by modelling the process as 'People in hospital X get a random duration distributed N(mu_1, sigma) for hospital A and N(mu_2, sigma) for hospital B', then start adding more complexity to account for other effects such as the level of stress on the hospital, in-week periodicity, different levels of variation, etc. etc.
If you're not interested in healthcare, let's say I rolled a die and got the following results:
table(floor(runif(10000, 1, 7)))

   1    2    3    4    5    6 
1677 1675 1612 1641 1690 1705 

Great, we have perfect observations that over 10,000 rolls we have an average of 3.5107. But that's history now and we can't do much about that. The question we might want to answer is 'is this die fair', and then we're back to comparing the process which generated the observations above with the process which gives us each number with a 1/6 chance.
A: Update
So far neither the question nor any answer has provided a compelling example for the situation "we are given an entire population, so we don't need to do any inferring." I've been wondering whether this occurs outside a “Stat 101”-type of class and I found two examples in Improving Your Statistical Inferences, a great freely available resource by Daniël Lakens. The section Population vs. Sample is well worth the read by anyone who has the same question as the OP.
The first example is definitely a “Stat 101”-type of example, cute and without any relevance to a real-world problem: twelve people have walked on the moon, we know their height (or someone in NASA does), so we know the population average height of humans who have walked on the moon.
The second example is more interesting: [2] is a registy-based study of all children in Norway aged 5—17 between 2008 and 2016 (n = 1,354,393 children). The researchers investigate whether family income is linked to childhood mental illness. Even though technically the research have the entire population, they perform and report inferences, eg, "In the bottom 1% of parental income, 16.9% [95% confidence interval (CI): 15.6, 18.3] of boys had a mental disorder compared with 4.1% (95% CI: 3.3, 4.8) in the top 1%." A good example that there is much more to "inferring" in practice than the population mean which we can compute (if we have the population) or estimate (if we have a sample from the population).
References
[1] Daniël Lakens. Improving Your Statistical Inferences. Available online. 
[2] J. M. Kinge et al. Parental income and mental disorders in children and adolescents: prospective register-based study. International Journal of Epidemiology, 50(5):1615–1627, 2021. 

The statement "if we are given an entire population, why don't we calculate the average of that population" might be an unhelpful abstraction. For one, we average measurements, not samples or populations.
Statistics is the study of measurements and variation. If we can enumerate all individuals in a population, if we can measure the quantity of interest exactly from each individual and if those measurements and the population never change, then yes, there is no need for statistics because we have the complete data and there is no uncertainty to quantify. Also, this scenario sounds rather contrived.
Instead it might help to think of a non-trivial real-world example where the population is small & well understood, yet we still use statistics: forecasting the US presidential election, a process which involves the 50 US states (+ Washington, D.C.). We know how each state voted in the past and we want to predict how each state will vote in the next elections based on the historical voting patterns, past & current polls and any other relevant information. There is much uncertainty: we cannot measure precisely voting intent today and even if we could, the voting intent today is not exactly the same as the voting intent tomorrow. So even though we know the population of US states and it has only 50 members, to forecast elections, it can help to think of it as a dynamic collection of 50 states, one for each day until the election.
A: Maybe I am just imagining this, but from what you
say in your question, it seems you might be receptive to the idea of bootstrapping, briefly
illustrated below.
Suppose you have a random sample of size $50$ from some unknown
population. You don't know the population mean or standard deviation, nor do you know the general shape of the distribution. You do assume the population mean $\mu$ exists and want a 95% confidence interval of $\mu.$ A boxplot of the
fifty observations at hand is as shown.
boxplot(x, horizontal=T, col="skyblue2", pch=20)


If you had a good idea of the variability of the
sample means $\bar X$ around the population $\mu$ mean, you could use some
relationship such as $D = \bar X -\mu$ then you might use something like $P(L_D < \bar X-\mu < U_D) = 0.95$ to get the 95% CI $\bar X -U_D, \bar X-L_D.$
Instead, you look at many 're-samples' of 50 observations, sampling with replacement from the
data you have. A typical number of re-samples is $B = 2000,$ a job for a computer.) From them you can often get an idea
of the values of $U_D$ and $L_D,$ and hence an
approximate CI for $\mu.$ One 95% bootstrap CI for $\mu$ turns out to be $(22.0,\, 28.3).$
a.obs = mean(x);  a.obs
[1] 25.28573
set.seed(626)
d = replicate(2000, mean(sample(x, 50, rep=T))-a.obs)
UL = quantile(d, c(.975,.025))
a.obs - UL
  97.5%     2.5% 
22.04661 28.26154     ## Bootstrap CI.

Of course, the randomness in the 'resampling' will
lead to a slightly different bootstrap CI on each run. (My partial cure for that is heavy rounding of endpoints.) Also, there are many different styles of bootstrap CIs.
Note: The data in the example above are sampled in R from a gamma distribution with $\mu = 25.$
set.seed(2022)
x = rgamma(50, 4, 4/25) 

If you don't like the bootstrapping idea, then I recommend @Dave's (+1) Answer.
A: We’d love to calculate population parameters!
All of inferential statistics is about inferring. In other words, we are using our data at hand to guess about something greater than the data (e.g., the population from which the data are drawn). We can be silly with our guesses, or we can be thoughtful. Good statisticians intend to be thoughtful in order to make good guesses.
Those guesses are the inferences.
If we had the whole population, we wouldn’t have to guess, so inference would not be useful. We would just calculate the population parameters, and that’s the end. Alas, we tend to be interested in something greater than our data, so inferences are necessary.
The specific example you give of doing a z-test with a known variance and unknown standard deviation is a special case. With real data, we never know the true variance. However, such a test is useful as a first example of how to do hypothesis testing, and it serves a useful educational purpose in a “Stat 101”-type of class.
A: Apart from that the population may be too big or part of it somewhere hidden, part of objects just may not exist at the time of the measurement.
If you craft bolts and measure them, statistical estimates like average length plus minus remain valid for the bolts you will make in the future, if you do not change the technology or intended length.
It is also possible to imagine situations when some objects are already lost/destroyed at the time of the measurements, and you need to make conclusions about them from the objects still available.
A: 
We compute confidence intervals to estimate the true population mean of either a sample (when population standard deviation is unknown)

"Population mean" refers to the mean of the population. There's no population mean of the sample, only sample mean.

But I wonder why, if we are given an entire population, why don't we calculate the average of that population instead of computing confidence interval to estimate the population mean since we already have the entire population?

We aren't given the entire population. However, in hypothesis testing we, as the name suggests, test hypotheses. The hypothesis generally has at the very least a family of distribution, (e.g. "The null hypothesis is that the data is normally distributed"), and generally includes one or more parameters for that family. When a null hypothesis is that the data is normally distributed and specifies a mean and a standard deviation, we use the z-test. When it says it's normally distributed and specifies a mean but not a standard deviation, we use the t-test.
When we have a null hypothesis that has a specific standard deviation, that doesn't mean we were given that standard deviation, any more than having a null hypothesis with a specific mean means that we were given that mean. It just means that we are testing the hypothesis that that is the correct standard deviation. So technically speaking, if we reject the null with a z-test, that means that the null hypothesis' mean is incorrect, OR its standard deviation is wrong, OR the data is not normally distributed.
Reasons we would use a z-test include:
-The sample size is large enough that the difference between z and t is neglible.
-We have some process that we think may have been altered in a manner that would change the mean, but we think the chances of the standard deviation changing are significantly lower.
-We're using a simpler test for the pedagogical motivation of making things simpler when first introducing students to hypothesis testing.
A: The other answers are good, but to give a concrete example: suppose you want to know the average height of mayors of London. So far there have only been 3 mayors of London, so you take the mean of their heights and find it is 173cm. This is exactly the mean height of all the mayors of London so far. But there will be more mayors of London in future, and they will shift the mean to different values, so it isn't really useful to claim that the population mean is certainly exactly 173cm.
