Maybe it is best to just work out the calculation step-by-step.
First, let $U = R_y(\phi_2) R_x(\phi_1) $, and $|\psi \rangle = U|0\rangle$.
The goal is to calculate $ \langle \psi| \sigma_z |\psi \rangle$ where $\sigma_z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$.
- Computing $|\psi \rangle$ explicitly.
\begin{align}
U|0 \rangle &= R_y(\phi_1)R_x(\phi_2) |0\rangle =\begin{pmatrix}
\cos{\dfrac{\phi_1}{2}} & -\sin\dfrac{\phi_1}{2} \\
\sin\dfrac{\phi_1}{2} & \cos\dfrac{\phi_1}{2}
\end{pmatrix} \begin{pmatrix}
\cos\dfrac{\phi_2}{2} & -i\sin\dfrac{\phi_2}{2} \\
-i\sin\dfrac{\phi_2}{2} & \cos\dfrac{\phi_2}{2}
\end{pmatrix}
\begin{pmatrix}1 \\ 0 \end{pmatrix}\\
&= \begin{pmatrix}
\cos{\dfrac{\phi_1}{2}} & -\sin\dfrac{\phi_1}{2} \\
\sin\dfrac{\phi_1}{2} & \cos\dfrac{\phi_1}{2}
\end{pmatrix}
\begin{pmatrix}\cos\dfrac{\phi_2}{2} \\ -i\sin\dfrac{\phi_2}{2} \end{pmatrix}\\
&= \begin{pmatrix}
\cos\dfrac{\phi_1}{2}\cos\dfrac{\phi_2}{2} + i\sin\dfrac{\phi_1}{2}\sin\dfrac{\phi_2}{2} \\
\sin\dfrac{\phi_1}{2}\cos\dfrac{\phi_2}{2} - i\cos\dfrac{\phi_1}{2}\sin\dfrac{\phi_2}{2} \end{pmatrix} = |\psi\rangle\\
\end{align}
Compute $\sigma_z|\psi\rangle$
$$\sigma_z|\psi\rangle = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \begin{pmatrix}
\cos\dfrac{\phi_1}{2}\cos\dfrac{\phi_2}{2} + i\sin\dfrac{\phi_1}{2}\sin\dfrac{\phi_2}{2} \\
\sin\dfrac{\phi_1}{2}\cos\dfrac{\phi_2}{2} - i\cos\dfrac{\phi_1}{2}\sin\dfrac{\phi_2}{2} \end{pmatrix} = \begin{pmatrix}
\cos\dfrac{\phi_1}{2}\cos\dfrac{\phi_2}{2} + i\sin\dfrac{\phi_1}{2}\sin\dfrac{\phi_2}{2} \\
-\sin\dfrac{\phi_1}{2}\cos\dfrac{\phi_2}{2} + i\cos\dfrac{\phi_1}{2}\sin\dfrac{\phi_2}{2} \end{pmatrix} = |\phi \rangle $$
Compute $ \langle \psi| \sigma_z |\psi \rangle = \langle \psi | \phi \rangle $
\begin{align}
\langle \psi | \phi \rangle &= \begin{pmatrix}
\cos\dfrac{\phi_1}{2}\cos\dfrac{\phi_2}{2} - i\sin\dfrac{\phi_1}{2}\sin\dfrac{\phi_2}{2} &
\sin\dfrac{\phi_1}{2}\cos\dfrac{\phi_2}{2} + i\cos\dfrac{\phi_1}{2}\sin\dfrac{\phi_2}{2} \end{pmatrix} \begin{pmatrix}
\cos\dfrac{\phi_1}{2}\cos\dfrac{\phi_2}{2} + i\sin\dfrac{\phi_1}{2}\sin\dfrac{\phi_2}{2} \\
-\sin\dfrac{\phi_1}{2}\cos\dfrac{\phi_2}{2} + i\cos\dfrac{\phi_1}{2}\sin\dfrac{\phi_2}{2} \end{pmatrix} \\
&= \cos^2\dfrac{\phi_1}{2}\cos^2\dfrac{\phi_2}{2} + \sin^2\dfrac{\phi_1}{2}\sin^2\dfrac{\phi_2}{2} - \sin^2\dfrac{\phi_1}{2}\cos^2\dfrac{\phi_2}{2} - \cos^2\dfrac{\phi_1}{2}\sin^2\dfrac{\phi_2}{2} \\
&= \cos(\phi_1)\cos(\phi_2) \hspace{1 cm} \textrm{(Trig identities manipulation)}
\end{align}