Tempearture of the system decreases while using fix NVT ensemble, the same is observed while running using temp/rescale fix along with fix NVE also, how to maintain the temperature given along the simulation

I am using LAMMPS (23 Jun 2022 - Update 4)
I am trying to simulate the liquid on top of the graphite surface, Initially, I used fix NVT to simulate in 298.15 K but the temperature goes to around ~287 K . I also tried it with velocity rescale running with fix temp/rescale in fix NVE, here also the temperature goes to a lower value than the expected one after the first step. I have the input and data files for the reference

Input and data files for fix NVT
input_nvt.lammps (1.5 KB)
log_nvt.lammps (91.9 KB)
graphene_water_nvt.data (6.5 MB)

Input files and the screenshot of the log file for fix temp/rescale and fix NVE

input.lammps (1.5 KB)
graphene_water_nvt.data (6.5 MB)

also please recommend any resources or websites regarding the use of thermostats in MD simulation where I could find which simulation needs which type of thermostats and also for barostats

Thanks

You are applying the thermostat only to the group H2O but the thermo output is for the whole system.
You should be monitoring the temperature compute used by the thermostat. As stated in the documentation, this compute would have the compute ID H2O_temp in your case.

This would be a topic for a discussion with your adviser, a read through (good) text books, and some searches through the published literature for comparisons of thermostat/barostat algorithms.

Thank you