rigidbody velocity on x axis and addforce on y axis ??

how can i make my object can use rigidbody velocity on x axis and addforce on y axis, i want to move my character with velocity and make jump and gravity with addforce, i try :

vector3 forced = new vector3 (0, transform.position.y, 0);
myRb.AddForce(forced);

vector3 mov = new vector3 (transform.position.x, 0, 0);
myRb.velocity = (move * speed);

but it’s not move like i want, how can i make velocity just on x axis, and addforce on y axis cause i want to make gravity and jump.

myRb.AddForce(Vector3.up * yForce);
myRb.velocity = new Vector3(xSpeed, myRb.velocity.y, myRb.velocity.z);
The yForce and xSpeed variables will need to be replaced by a constant (a number) or created as variables