[guided]The goal is to turn information about the tail probabilities $\mathbb P(X>t)$ into information about the moment $\mathbb E[X^p]$. Let $\mathcal L^1$ denote one-dimensional Lebesgue measure on the Borel $\sigma$-algebra $\mathcal B((0,\infty))$. To do this, define the map $Y:\Omega\to[0,\infty]$ by
\begin{align*}
Y(\omega)=X(\omega)^p\quad\text{for every }\omega\in\Omega.
\end{align*}
This is a nonnegative measurable random variable because $X$ is measurable and $r\mapsto r^p$ is Borel measurable on $[0,\infty]$.
For a fixed $\omega\in\Omega$, the number $Y(\omega)$ is the length of the interval $(0,Y(\omega))$. Therefore
\begin{align*}
Y(\omega)=\int_0^\infty \mathbb{1}_{(0,Y(\omega))}(s)\,d\mathcal L^1(s).
\end{align*}
The integrand $(\omega,s)\mapsto \mathbb{1}_{(0,Y(\omega))}(s)$ is nonnegative and measurable on the product measure space $(\Omega\times(0,\infty),\mathcal F\otimes\mathcal B((0,\infty)),\mathbb P\otimes\mathcal L^1)$, so Tonelli's theorem applies. Hence
\begin{align*}
\mathbb E[X^p]=\int_\Omega Y(\omega)\,d\mathbb P(\omega).
\end{align*}
Substituting the interval-length representation of $Y(\omega)$ gives
\begin{align*}
\int_\Omega Y(\omega)\,d\mathbb P(\omega)=\int_\Omega\int_0^\infty \mathbb{1}_{(0,Y(\omega))}(s)\,d\mathcal L^1(s)\,d\mathbb P(\omega).
\end{align*}
Tonelli's theorem permits interchange of the two nonnegative integrals, so
\begin{align*}
\int_\Omega\int_0^\infty \mathbb{1}_{(0,Y(\omega))}(s)\,d\mathcal L^1(s)\,d\mathbb P(\omega)=\int_0^\infty\int_\Omega \mathbb{1}_{(s,\infty)}(Y(\omega))\,d\mathbb P(\omega)\,d\mathcal L^1(s).
\end{align*}
By the definition of probability of the event $\{Y>s\}$,
\begin{align*}
\int_0^\infty\int_\Omega \mathbb{1}_{(s,\infty)}(Y(\omega))\,d\mathbb P(\omega)\,d\mathcal L^1(s)=\int_0^\infty \mathbb P(Y>s)\,d\mathcal L^1(s).
\end{align*}
Since $Y=X^p$ and $r\mapsto r^p$ is strictly increasing on $[0,\infty]$, the event $\{Y>s\}$ is exactly the event $\{X>s^{1/p}\}$ for every $s>0$. Thus
\begin{align*}
\mathbb E[X^p]=\int_0^\infty \mathbb P(X>s^{1/p})\,d\mathcal L^1(s).
\end{align*}
Now apply the one-dimensional change-of-variables theorem for Lebesgue integrals in its nonnegative measurable, possibly extended-valued, form with the map $\varphi:(0,\infty)\to(0,\infty)$ defined by $\varphi(t)=t^p$. This map is a $C^1$ bijection, and its derivative is $\varphi'(t)=p t^{p-1}$. The integrand $s\mapsto \mathbb P(X>s^{1/p})$ is nonnegative and measurable, so this form of the theorem applies. Therefore the transformed measure factor is $p t^{p-1}\,d\mathcal L^1(t)$, and
\begin{align*}
\mathbb E[X^p]
=p\int_0^\infty t^{p-1}\mathbb P(X>t)\,d\mathcal L^1(t).
\end{align*}
This identity is the bridge between the tail estimate and the desired moment estimate.[/guided]