change direction of game object after it reaches a position

hi i’m working on a project and i need to reverse the direction of a game object in x axis(it is moving in x-axis before too).

Any help is greatly appreciated.

Probably want something like this attached to the gameobject

private Rigidbody2d rb;
private const Vector2 NEGATIVE_X= new Vector2(-1, 1);

void Start()
   rb = GetComponent<Rigidbody2D>();

public void reverseXDirection() //call this when you need it
   rb.velocity *= NEGATIVE_X;
   // or transform.position *= NEGATIVE_X; // if this is needed instead