WaitForSeconds Error?

I have a button that I want to make a click noise and then go to the main menu, if I dont use the ‘WaitForSeconds’ function the scene loads before the click noise can work. I thought I was using the function correctly but apparently not.

 void OnClick()
{  
    IEnumerator MyMethod() 
    {
        StartCoroutine(MyMethod());
        GetComponent<AudioSource>().Play();
        yield return new WaitForSeconds (.5);
        SceneManager.LoadScene("Settings");
    }
}

I think you should try it like this:

    void OnClick()
    {
        StartCoroutine(MyMethod());
    }

    IEnumerator MyMethod()
    {
        StartCoroutine(MyMethod());
        GetComponent<AudioSource>().Play();
        yield return new WaitForSeconds(.5f);
        SceneManager.LoadScene("Settings");
    }

I have not tested it though but i dont think you can put coroutines inside of methods like you did. You can however use StartCoroutine to start your coroutine.