In hypothesis testing, one usually calculates $p$-value by assuming that null hypothesis holds. In wiki page of $p$-value, first sentence verifies my statement above. To write $p$-value using mathematical notation, I think it is the following $$p-value = P( observation| H_0 \text{ is true }).$$ But in reality, one is interested in its reverse, i.e. $$P( H_0 \text{ is true }| observation ).$$ To connect the 2 quantities, one can use Bayes' rule: $$P(H_0 \text{ is true }| observation) = \frac{P( observation| H_0 \text{ is true }) P(H_0 \text{ is true }) }{P(observation)}.$$ Does my understanding above hold?
I seldom see reasoning above involving $p$-value. So it must be false somewhere in my reasoning. But I could not find it.