Can a waitforseconds be inside a OnTriggerEnter or OnCollisionEnter?

Is it possible to make the code inside a void OnTriggerEnter(Collider other) or a void OnCollisionEnter(Collision collisionInfo) wait X seconds before carrying on.
Here’s the code I’m currently using:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Collision : MonoBehaviour
{
    private Movement movement;
    // Start is called before the first frame update
    void Start()
    {
        movement = GetComponent<Movement>();
    }

    // Update is called once per frame
    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Obstacle")
        {
            
            movement.enabled = false;
        }
    }
}

OnCollisionEnter and OnTriggerEnter (and their 2D counterparts) can be ran as coroutine. So simply do:

public IEnumerator OnCollisionEnter(Collision collision)
{
     if (collision.gameObject.CompareTag("Obstacle"))
     {             
         movement.enabled = false;
         yield return new WaitForSeconds(1);
         movement.enabled = true;
     }
}

Or else, put the content of the function inside of another coroutine

public void OnCollisionEnter(Collision collision)
{
     if (collision.gameObject.CompareTag("Obstacle"))
     {             
         StartCoroutine(OnCollisionWithObstacle());
     }
}

public IEnumerator OnCollisionWithObstacle()
{
     movement.enabled = false;
     yield return new WaitForSeconds(1);
     movement.enabled = true;
}