push moving objects the player in inverse direction

my player is moving forward and some objects are moving toward the player . in some situation ,some objects should can push the player backward for a limited time .
i used different ways :
1 :

if  (... )
{ StartCoroutine(pushplayer()); }

IEnumerator pushplayer()
    {
        float time = 0;
      while (time < 0.20f)
     {
GetComponent<Rigidbody>().AddForce(new Vector3(0, 0, -10));
            time += Time.deltaTime;
            yield return null;
       }
        GetComponent<Rigidbody>().AddForce(new Vector3(0, 0, 10));
    }

//in this way the gameobject does not push the player ,just the player move in inverse direction without //time limiting

//2 :

     if  (... )
    { StartCoroutine(pushplayer()); }
    
    IEnumerator pushplayer()
        {
            float time = 0;
          while (time < 0.20f)
         {
    transform.Translate(new Vector3(0, 0,- 0.1f));
                time += Time.deltaTime;
                yield return null;
           }
    }

``

// in this way the game objects push player , but it works just in low speeds . and in higher speed the //player pass through the gameobject .

//3 :

if  (... )
{ StartCoroutine(pushplayer()); }

IEnumerator pushplayer()
    {
        float time = 0;
      while (time < 0.50f)
     {
         transform.Translate(transform.InverseTransformDirection(1, 0, 1));
            time += Time.deltaTime;
            yield return null;
       }
       
    }

// i wanted to move the player in diverse direction , but nothing happen .

if any body help me , i will be so thankful .

I donĀ“t know what the hell are you doing, but I think that the correct way to use the methods Translate and AddForce is:

Rigidbody.AddForce(transform.forward * ForceAmonut);

Transform.Translate(Vector3.forward * Speed);

you could check the scripting API before asking