$f(x)=T_n(x)+R_n(x)$
($T_n(x)$: nth Taylor polynomial of $f$ at $a$)
Lagrange form of the remainder:
$R_n(x)=\frac{f^{(n+1)}(z)}{(n+1)!}(x-a)^{n+1}$($z$ exists between $x$ and $a$)
For example:
$f(x)=e^x$
$R_n(x)=\frac{e^x}{(n+1)!}x^{n+1}(a=0)$
i) $x>0$
$0<z<x\implies e^z<e^x$
$0< R_n(x) =\frac{e^z}{(n+1)!}x^{n+1}<e^x\frac{x^{n+1}}{(n+1)!}\to0$($\lim\limits_{n \to \infty} \frac{x^n}{n!}=0$)
(Notice that $z$ depends on $n$)
By squeeze theorem, when $n \to \infty$, $R_n(x) \to 0$
ii) $x<0$
...
So $e^x$ is equal to it's Taylor series
Why $z$ depends on $n$ in the proof? If not so, squeeze theorem is not necessary because we can calculate limit value directly: $\lim\limits_{x \to \infty} R_n(x) =\lim\limits_{x \to \infty}\frac{e^z}{(n+1)!}x^{n+1}=0$
Because every $z$ will be different. Supposing a sufficiently smooth function with non-zero derivatives, you can take the next two Taylor terms after the polynomial to get approximately \begin{align} R_n(x)&\approx\frac{f^{(n+1)}(a)}{(n+1)!}(x-a)^{n+1}+\frac{f^{(n+2)}(a)}{(n+2)!}(x-a)^{n+2} \\ &=\frac{(x-a)^{n+1}}{(n+1)!}\left(f^{(n+1)}(a)+f^{(n+2)}(a)\frac{x-a}{n+2}\right) \\ &\approx \frac{(x-a)^{n+1}}{(n+1)!}f^{(n+1)}\left(a+\frac{x-a}{n+2}\right) \end{align} so that $z_n\approx a+\frac{x-a}{n+2}$ which shows a non-negligible dependence on $n$.