How to I code diagonal velocity?

I am making a diagonal dash move in my game but I can’t figure out how to add velocity values to make the character move diagonally.

You could just add the same amount of force in both the y-axis and the x-axis (or z).

like so:

public float speed =  3f; // this can be whatever you want
public Transform transform; // make a reference to the transform in the inspector.

void Update()
{
        transform.Translate(0f, speed, 0f) // This will move it up
        transform.Translate(speed, 0f, 0f) // This will move it sideways
        // Together they will move it diagonally
}