This question seems related to your other questions The correct way of looking at Fourier transform and How the Fourier transform show the frequency extent of $f(x)$?.
A function $f(x)$ can be approximated on the interval $-\frac{P}{2}<x<\frac{P}{2}$ by the exponential Fourier series
$$f(x)=\sum\limits_{n=-\infty}^\infty c_n\, e^{i 2 \pi \frac{n}{P} x}\tag{1}$$
where
$$c_n=\frac{1}{P} \int\limits_{-\frac{P}{2}}^{\frac{P}{2}} f(x)\, e^{-i 2 \pi \frac{n}{P} x} \, dx\tag{2}$$
The Fourier transform of the function $f(x)$ can be defined as
$$F(\omega)=\mathcal{F}_{x}[f(x)](\omega)=\lim\limits_{P\to\infty}\left(\int\limits_{-\frac{P}{2}}^{\frac{P}{2}} f(x)\, e^{-i 2 \pi \omega x} \, dx\right)\tag{3}$$
which is somewhat analogous to formula (2) above (the exact relationship is clarified further below).
Also the Fourier series for $f(x)$ and the inverse Fourier transform
$$f(x)=\mathcal{F}^{-1}_{\omega}[F(\omega)](x)=\int\limits_{-\infty}^{\infty} F(\omega)\, e^{2 \pi i x \omega} \, d\omega\tag{4}$$
both recover the function $f(x)$, so the Fourier series for $f(x)$ is more analogous to the the inverse Fourier transform than the Fourier transform.
I think the correct way of looking at the connection between the inverse Fourier transform and Fourier series is the "nested" Fourier series representation
$$f(x)=\mathcal{F}^{-1}_{\omega}[F(\omega)](x)=\int\limits_{-\infty}^{\infty} F(\omega)\, e^{2 \pi i x \omega} \, d\omega\\=\lim\limits_{N, f\to\infty}\left(\sum\limits_{n=1}^N \frac{\mu(2 n-1)}{2 n-1} \left(\frac{1}{2} \sum\limits_{k=-2 f (2 n-1)}^{2 f (2 n-1)} (-1)^k\, \cos\left(\frac{\pi k}{2 n-1}\right)\, F\left(\frac{k}{4 n-2}\right) e^{\frac{i \pi k x}{2 n-1}}\\-\frac{1}{8} \sum\limits_{k=-4 f (2 n-1)}^{4 f (2 n-1)} (-1)^k\, F\left(\frac{k}{8 n-4}\right) e^{\frac{i \pi k x}{4 n-2}}\right)\right)\tag{5}$$
where $\mu(n)$ is the Möbius function, the evaluation frequency $f$ in the inner sum over $k$ is assumed to be a positive integer, and
$$F(\omega)=\mathcal{F}_{x}[f(x)](\omega)=\int\limits_{-\infty}^{\infty} f(x)\, e^{-i 2 \pi \omega x} \, dx\tag{6}$$
is the Fourier transform of $f(x)$.
Formula (5) above is a refinement of formula (5) in my related MSO question which provides information on its derivation.
I believe the "nested" Fourier series for $f(x)$ defined in formula (5) above converges for $x\in\mathbb{R}$ when the function $f(x)$ is recoverable from its Fourier transform $F(\omega)$ via the Fourier inversion theorem. My related MSO question linked above illustrates several examples of recovering a function $f(x)$ from its Fourier transform $F(\omega)$ via the "nested" Fourier series representation defined in formula (5) above.
The remainder of this answer clarifies more precisely the relationship between the Fourier series coefficients $c_n$ defined in formula (2) above and the Fourier transform $F(\omega)$ defined in formula (6) above, and also similarities and differences between the Fourier series and the "nested" Fourier series defined in formulas (1) and (5) above.
Note the Fourier series coefficient $c_n$ in formulas (1) and (2) above can be evaluated as
$$c_n=\frac{1}{P}\, C_P\left(\frac{n}{P}\right)\tag{7}$$
where
$$C_P(\omega)=\int\limits_{-\frac{P}{2}}^{\frac{P}{2}} f(x) \, e^{-i 2 \pi \omega x} \, dx\tag{8}$$
is a Fourier transform with a truncated integration range and note that
$$F(\omega)=\lim\limits_{P->\infty} C_P(\omega)\tag{9}$$
Note the functions $F(\omega)$ and $C_P(\omega)$ are both continuous, but since $F(\omega)$ is only evaluated at rational values of $\omega$ in formula (5) above its only necessary to account for a countably infinite number of frequencies to recover the function $f(x)$ from the "nested" Fourier series in formula (5) above as well as the Fourier series in formula (1) above.
It seems to me that saying $F(\omega)$ represents the frequency content of $f(x)$ is analogous to saying that $C_P(\omega)$ represents the frequency content of $f(x)$, but note there are an uncountably infinite number of values of $\omega$ for which $C_P(\omega)\ne 0$ which are not accounted for in the Fourier series for $f(x)$, and likewise there are an uncountably infinite number of values of $\omega$ for which $F(\omega)\ne 0$ which are not accounted for in the "nested" Fourier series for $f(x)$. So perhaps its more correct to say $F(\omega)$ contains the frequency content of $f(x)$ in the same sense that $C_P(\omega)$ contains the frequency content of $f(x)$.
Fourier series can be used to approximate periodic functions, but the "nested" Fourier series representation is not applicable to periodic functions since the the Fourier transform of a periodic function doesn't converge in the usual sense. Fourier series can be used to approximate a function over some interval of $x$, whereas the "nested" Fourier series can be used to recover a function for $x\in\mathbb{R}$ when the Fourier inversion theorem is applicable (and even for $x\in\mathbb{C}$ when $f(x)$ is holomorphic).