The code after the second Debug.Log is executed, it’s just not doing anything visible. I guess you were looking for: Renderer rend = GetComponent<Renderer>();
There are some situations were you don’t need a variable assignment since there’s no return value (things like list.Sorted()), but this is not one of them.