I was using Unity in 3D mode than I had to change to HDRP:
rend.material.mainTextureOffset
and
rend.material.SetTextureOffset
were working normally but when upgraded to HDRP, they were not affecting the variables and not changing the scene so I thought they could have another parameter name or function.
To change the color of the material I had to change from: rend.material.SetColor("_Color", colors[0]);
to rend.material.SetColor("_BaseColor", colors[0]);