  By utilizing the spatially-resolved photometry of galaxies at $0.2<z<3.0$ in
the CEERS field, we estimate the resolved and unresolved stellar mass via
spectral energy distribution (SED) fitting to study the discrepancy between
them. We first compare $M_{\ast}$ derived from photometry with and without the
JWST wavelength coverage and find that $M_{\ast}$ can be overestimated by up to
0.2 dex when lacking rest-frame NIR data. The SED fitting process tends to
overestimate both stellar age and dust attenuation in the absence of rest-frame
NIR data, consequently leading to a larger observed mass-to-light ratio and
hence an elevated $M_{\ast}$. With the inclusion of the JWST NIR photometry, we
find no significant disparity between the resolved and unresolved stellar mass
estimates, providing a plausible solution to the conflict between them out to
$z\sim 3$. Further investigation demonstrates that reliable $M_{\ast}$
estimates can be obtained, regardless of whether they are derived from
spatially resolved or spatially unresolved photometry, so long as the reddest
filter included in the SED fitting has a rest-frame wavelength larger than
10000 \AA.
