I want to get NDWI from MODIS mod021km as GeoTIFF files. As far as you know, MODIS images are not georeferenced and the point is georeferencing these imagages is a little bit inaccurate (because of resampling ...). So I don't know that I should georeference bands at first and then calculate the NDWI, or I should calculate ndwi at first and then georeference it and save it as a GeoTIFF file? Which one is better and more accurate?
You should compute the NDWI first then georeference it. This is because NDWI is a ratio, and the linear combination of ratio is not the same as the ratio of the linear combination. You therefore reduce the risk of having artefacts by resampling after computing the NDWI (the resampling will smooth the NDWI a little bit, except if you use a nearest neighbour resampling).