  The emergence of high transition temperature ($T_c$) superconductivity in
bulk FeSe under pressure is associated with the tuning of nematicity and
magnetism. However, sorting out the relative contributions from magnetic and
nematic fluctuations to the enhancement of $T_c$ remains challenging. Here, we
design and conduct a series of high-pressure experiments on FeSe thin flakes.
We find that, as the thickness decreases, the nematic phase boundary on
temperature-pressure phase diagrams remains robust while the magnetic order is
significantly weakened. A local maximum of $T_c$ is observed outside the
nematic phase region, not far from the extrapolated nematic endpoint in all
samples. However, the maximum $T_c$ value is reduced associated with the
weakening of magnetism. No high-$T_c$ phase is observed in the thinnest sample.
Our results strongly suggest that nematic fluctuations alone can only have a
limited effect while magnetic fluctuations are pivotal on the enhancement of
$T_c$ in FeSe.
