In this work, numerical simulation of natural convection of nanofluids within a square enclosure are conducted by using the non-dimensional lattice Boltzmann method (NDLBM). The effects of key governing parameters Knudsen number ($10^{-6} \leqslant Kn_{{\rm{f}},{\rm{s}}} \leqslant 10^4$), Rayleigh number ($10^3 \leqslant Ra_{{\rm{f}},{\rm{L}}} \leqslant 10^6$), and nanoparticle volume fraction ($10^{-2} \leqslant \phi_{\rm{s}} \leqslant 10^{-1}$) on the heat and mass transfer of nanofluids are discussed. The results show that in the low $Ra_{{\rm{f}},{\rm{L}}}$ conduction dominated regime, the nanoparticle size has little effect on heat transfer, whereas in the high $Ra_{{\rm{f}},{\rm{L}}}$ convection dominated regime, larger nanoparticle size significantly enhances flow intensity and heat transfer efficiency. For fixed $Ra_{{\rm{f}},{\rm{L}}}$ and $\phi_{\rm{s}}$, the heat transfer patterns change from conduction to convection dominated regime with $Kn_{{\rm{f}},{\rm{s}}}$ increasing. The influence of nanoparticle volume fraction is also investigated, and in the convection-dominated regime, the maximum heat transfer efficiency is achieved when $\phi_{\rm{s}} = 8 {\text{%}}$, balancing thermal conduction and drag fore of nanofluid. Additionally, by analyzing the full maps of mean Nusselt number ($\overline {Nu}_{{\rm{f}},{\rm{L}}}$) and the enhancement ratio related to the base fluid ($Re_{{\rm{n}},{\rm{f}}}$), the maximum value of $\overline {Nu}_{{\rm{f}},{\rm{L}}}$ and $Re_{{\rm{n}},{\rm{f}}}$ occur when the nanoparticle size is $Kn_{{\rm{f}},{\rm{s}}} = 10^{-1}$ for both conductive and convection dominated regime. To ascertain the effects of all key governing parameters on $\overline {Nu}_{{\rm{f}},{\rm{L}}}$, a new empirical correlation is derived from the numerical results, providing a more in-depth insight into how these parameters influence on heat transfer performance.