How to make a cube continuously move?

Cube goes when I press the up arrow but won’t go up continuously. How do I fix this?

Code :

If(Input. GetKeyDown(KeyCode. UpArrow)) {
transform.Translate(Vector3.up * Time.deltaTime);
}

use

if(Input.GetKey(KeyCode.UpArrow)) { transform.Translate(Vector3.up * Time.deltaTime); }