How to make a better jump ?

I made a simple movement script, it all works fine only the jump not, if i press space it just teleports up, but i need to move up slower not just teleport. can anyone help ?
Here is the code :

if (Input.GetKeyDown("space"))
        {
            transform.Translate(0, 4, 0);
        }

you can use rigidbody component and change its velocity by code
for example

if (Input.GetKeyDown(“space”))
{
getcomponent().velocity = new Vector3 (0,4,0);
}