Maclaurin series of $f(g(x))$

I was doing some exercise about Maclaurin expansion when I notice something, I used to remember the series formula of some common functions with $x$ as argument, but when I had to calculate the expansion for the same function but with $x^2$ as argument, for example, I always recalculate the series from scratch.

Then I started to realise that I could have just substituted $x$ with $x^2$. So is it wrong to say that, given a polynomial function $P(x)$ which represent the series of Maclaurin for a function $f(x)$, the series of Maclaurin for $f(g(x))$ is equal to $P(g(x))$ when $g(x)$ approach to $0$?

If it's not completely wrong can you give me some hints in order to understand when it's correct?

If $P$ converges within the disc $|x|<R$, then substituting $g(x)$ into the argument of $P$ changes the disc into $|g(x)|<R$. As long as this is obeyed, $P(g(x))$ converges.

As always, for this type of question on generating functions, the book "generatingfunctionology" is a great reference.

In addition to the radius of convergence conditions alluded to in answers above, the odd requirement is that the inner series, $h$ in
$$f(h(x))=g(x)$$ has constant term zero.