there is a very nice tutorial on the principles of GLCM and the derivation of the different parameters: https://prism.ucalgary.ca/handle/1880/51900
it was recently discussed here as well: GLCM - Window Size and Displacement parameters
You can also find many discussions and answers regarding this topic via the search function of this forum: https://forum.step.esa.int/search