Relationship of significance level and p-values In a hypothesis test, the null hypothesis $H_0$ is rejected in favor of $H_1$ if $|\bar X|>\mu$.
When tests found that $\bar x$ is the mean of the samples, a p-value is computed using
$$
p=\Pr(|\bar X|>\bar x)
$$
Using (e.g $\bar X\sim t(n-1) $ the p-value is obtained and the conclusion is:

Tests with significance level $\alpha≥p$ rejects the null hypothesis


This does not make sense to me. What does the p-value have to do with the significance level?
$p$ only tells the probability of obtaining $\bar X ≥\bar x$ or values as extreme as $\bar x$
On the other hand, $\alpha=\Pr(\bar X\in C)$ where $C$ is the critical region (i.e. $\Pr(|\bar X|>\mu)$) or the probability of exceeding the value $\mu$ as set by the practicioner.
I am struggling to see any formal connection between the two. Please help me connect their concepts. Thank you

This is more of a commentary in a broader sense but worth mentioning.
As framed in $\mathrm{ [I]}$ (sec. $14.2.4,$ p. $688$), $p$-value was developed by Fisher to (emphasis mine)

[...] evaluate the  worst-case scenario for the null hypothesis in the
sense that it involves the observed value of the statistic and realizations more damning
for the null. It measures the probability of observing a sample realization that would
produce a statistic value equal to or worse than the one already observed.
[I]f the p-value is small this implies that either the observed realization of the test statistic
constitutes a very rare event or the postulated null hypothesis is invalid.
In cases where the p-value is small the first choice is considered practically impossible and
the modeler adopts the view that the postulated hypothesis is invalid. ... In the early stages of his work
Fisher suggested $p$-values of $0.05$ and $0.01$ to be used as intuitive thresholds. Later on,
however, he insisted that one should separate the $p$-value from the decision to accept or
reject $H_0.$

The author conspicuously reminds (sec. $14.2.5,$ p. $692$) the readers:

In a certain sense the $p$-value represents the worst-case
scenario for the null hypothesis, taking into account not just the observed
sample realization but also more unfavorable realizations. The question of
accepting or rejecting $H_0$ is a separate issue and the $p$-value should not be confused with the significance level of the Neyman–Pearson testing framework [...]

and again in the same vein (sec. $14.3.5,$ p. $703$):

Even though the two can be related
mathematically, they constitute very different notions in different contexts. The
role of the $p$-value is inferential and that of the significance level is decision
making. This is why the use of $p$-values in the context of the Neyman–Pearson
approach was considered to be a sacrilege by Fisher ($1956$).

Please check $p$-value: Fisherian vs. contemporary frequentist definitions and other links therein.

Reference:
$\rm [I]$ Probability Theory
and Statistical Inference:
Econometric Modeling
with Observational Data, Aris Spanos, Cambridge University Press, $1999.$
