i need waiting time

Hi, It’s in the comment lines. I want it to wait 5 seconds first and then run the code below. How can I do it?

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

public class Kapı : MonoBehaviour
{
    [SerializeField]
    private GameObject KeyTrue;
    [SerializeField]
    private GameObject DoorOpen;
    [SerializeField]
    private GameObject DoorLocked;
   
    // Start is called before the first frame update


    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.tag =="Player" && KeyTrue.activeSelf)
        {
            DoorLocked.SetActive(false);
            DoorOpen.SetActive(true);
            other.gameObject.SetActive(false);

            // I NEED WAİT FOR SECOND
            // DoorLocked.SetActive(true);


        }
    }

    
}

Use it IEnumerator And use yield command

 void OnTriggerEnter2D(Collider2D other)
   {
       if (other.gameObject.tag =="Player" && KeyTrue.activeSelf)
       {
          StartCorutine(DoorOpen());
       }
   }

 IEnumerator DoorOpen()
{
  DoorLocked.SetActive(false);
  DoorOpen.SetActive(true);
  other.gameObject.SetActive(false);
  yield return new WaitForSeconds(5);
  DoorLocked.SetActive(true);    
}

Bye!!