For a zero mean sub-Gaussian R.V. we know that: $$ \mathbb{E}[e^{\lambda X}]\le e^{\frac{\lambda^2\sigma^2}{2}},\qquad\forall\lambda\in \mathbb{R}$$ From Taylor series expansion and equating the terms of the same power for $\lambda$ it can be easily obtained that: $$\mathbb{E}[X^2]\le \sigma^2$$
Is it possible to prove that $\mathbb{E}[X^2]=\sigma^2$ for the minimum $\sigma^2$ that the inequality $ \mathbb{E}[e^{\lambda X}]\le e^{\frac{\lambda^2\sigma^2}{2}}$ holds?
$\newcommand{\EE}{\mathbb{E}}$ Here's a counterexample that has expectation zero:
Let $X$ take the value $1-p$ with probability $p$ and the value $-p$ with probability $1-p$. Then $\EE X = 0$ and $\EE X^2 = p(1-p)$. The moment generating function is $$\EE e^{\lambda X} = e^{\lambda(1-p)} p + e^{-\lambda p} (1-p)$$ so the smallest variance proxy we can take is $$\sigma^2 = \sup_{\lambda \in \mathbb{R}} \frac{2}{\lambda^2} \log \left( e^{\lambda(1-p)} p + e^{-\lambda p} (1-p) \right) . $$
If we take $p=1/4$ then this gives $\sigma^2 \approx 0.2276$ while $p(1-p)=0.1875$.