Help with changing rotation speed and position of an image as time goes on.

I’m trying to understand how to do it. But I can’t seem to wrap my head around it.

void Update()
    {
        if (Input.GetKeyDown(LeftArrow))
        {
            transform.rotate.z + 1;
        }
    }

I don’t get it.

Keep in mind, this is a 2D game.

You want the key press to rotate as long as it’s held down? Use getKey()
Also you can’t change the z value directly, you need to use a new Vector and change that, or use Rotate()