How to disable current gameobject and enable next game object in a list?

Hey there everyone. So what I’m trying to achieve is the effect of a dialogue system. This is what I had envisioned and that shouldn’t he too hard for you guys who know what you’re doing.

So I activate the parent game object with the script.
It activates the first object in the list (I use list as in all the children of the parent gameobject, and first one below the parent gameobject).
Then the user presses Y and the current gameobject (the current child) is disabled and the next child gameobject is enabled (the one below the gameobject before/above it in the hierarchy).
So on and so forth for as many game objects needed.
Then on the last gameobject, the last child gameobject is disabled.
Then the first child gameobject is enabled ( you know just in case the whole thing needs to be repeated).
Then the parent gameobject is disabled.

If you could simply help just with the disabling the current child gameobject, enabling the next, disabling the last child gameobject, and enabling the first child gameobject, that would be great. I can do the rest, at least I think so. Any help would be helpful and would really help me get my project going in the right direction. Any clarification or anything will be given, just ask. Thank you Soo much everyone
Also sorry for this not being in the right topic. For some reason it doesn’t show anything relevant to this question.

using UnityEngine;

public class Dialogue : MonoBehaviour {

    private int currentPage = 0;
    private int maxPages;

    private void Awake()
    {
        //Get the page count.
        maxPages = transform.childCount;
    }

    public void TurnPage()
    {
        //If this is the first page.
        if (currentPage == 0)
        {
            //Activate it.
            transform.GetChild(currentPage).gameObject.SetActive(true);
        }
        else
        {
            //If this is not the first page
            //and we are below max pages.
            if(currentPage < maxPages)
            {
                //Disable previous page.
                transform.GetChild(currentPage - 1).gameObject.SetActive(false);
                //Enable the next one.
                transform.GetChild(currentPage).gameObject.SetActive(true);
            }
        }

        //Add page if we are below maxPages.
        if(currentPage < maxPages)
            currentPage++;

        //If we are at the last page.
        if(currentPage == maxPages)
        {
            //Disable it.
            transform.GetChild(currentPage - 1).gameObject.SetActive(false);
            //Enable first Page.
            transform.GetChild(0).gameObject.SetActive(true);
        }
    }
}