How can I change the other objects velocity when using OnTriggerEnter2D?

I want to make my Player to stop after a short delay when entering a zone

rb.angularVelocity = Vector3.zero;
rb.velocity = Vector3.zero;
float time = Time.time + 1;

where rb is your Rigidbody. of course to set the delay you have to create a float that takes in the current time and add to it, then do a check for Time.time > time to stop.

void OnTriggerEnter2D(Collider2D other) {
StartCoroutine(StopAfterDelay(1, other.gameObject.GetComponent()));
}

IEnumerator StopAfterDelay(float delay, Rigidbody2D body) {
    yield return new WaitForSeconds(delay);
    body.velocity = Vector2.zero;
}

Wrote it on my phone so sorry if there’s spelling errors. Should give you an idea anyways.