Random message generator out of control

I got this class where I have to generate a random message but for some reason it is going through all the messages at once rather fast and I don’t know how to control it. Can anyone help me get it to where it displays a random message once every time I run the application? Thank you in advance and happy new year.

Here is the class I am working on:

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

public class myFirstClass : MonoBehaviour {

    public enum taskList { task1, task2, task3, task4, task5, task6 }
    public static taskList currentTask = taskList.task1;

    List<int> taskCounter;

    public Rect GUIRectWindow;
    public Rect r_msg, btn_Begin;

    void Awake()
    {
        taskCounter = new List<int>(Enumerable.Range(1,3));
    }
    void OnGUI()
    {
        InstructionsWindow();
    }
    /// <summary>
    /// Displays the instructions
    /// </summary>
    public void InstructionsWindow()
    {
        // Make a background box
        GUI.Box(GUIRectWindow, "");
        switch (currentTask)
        {
            case taskList.task1:
                if (taskCounter.Count > 0)
                {
                    int randomIndex = Random.Range(0, taskCounter.Count);
                    int index = taskCounter[randomIndex];
                    
                    switch (randomIndex)
                    {
                        case 0:
                            drawLabel(r_msg, "Move the object left to right using a stick. Click 'Begin' when ready");
                            break;
                        case 1:
                            drawLabel(r_msg, "Move the object left to right using pliers. Click 'Begin' when ready");
                            break;
                        case 2:
                            drawLabel(r_msg, "Move the object left to right using a chicken. Click 'Begin' when ready");
                            break;
                    }
                }
				break;
        }
        if (drawButon(btn_Begin, "Begin"))
        {
            //TODO: When this button is pressed, add logic here
        }
    }
    void drawLabel(Rect rect, string labelname)
    {
        GUI.Label(new Rect(GUIRectWindow.x + rect.x, GUIRectWindow.y + rect.y, rect.width, rect.height), labelname);
    }
    bool drawButon(Rect rect, string buttonName)
    {

        if (GUI.Button(new Rect(GUIRectWindow.x + rect.x, GUIRectWindow.y + rect.y, rect.width, rect.height), buttonName))
        {
            return true;
        }
        return false;
    }
}

OnGUI runs every frame

so its calling the box every frame

its an easy fix though

Bool MessageDisplayed;
void Start()
{
MessageDisplayed = false;
}

    OnGUI
    {
    if(!MessageDisplayed)
       InstructionsWindow();
    }

Dont forget in your instructions window to at somepoint set it back to true;

Really though that means 24/7 youll have the box up (if you set it to true the moemnt you close the box, then the moment it closes it’ll open again)

so you need to set up probably 2 bools

one for wether it should display and another for if it is.

so

if( DisplayTrigger && !MessageDisplayed)
   DisplayInstructions();

then you can change messagedisplayed by starting it as false, changing to true when you draw the instructions and false when they click the button to exit them

and change display trigger so it for example only shows up when they press the help key or enter a trigger zone and it displays text to help you navigate that area of the world.