how do i access an item in a list like a gameobject?

i have a list of gameobjects that store my inventory as a list and i want to show\instantiate in a menu the items (i dont have adding items as a part of the game yet so i start the player with three items)

`public List ItemList = new List();

    ItemList.Add(RedPotion);
    ItemList.Add(BluePotion);
    ItemList.Add(GoldPotion);

    Instantiate(ItemList[2], Item2Location);`

it gives me an error “Index was out of range. Must be non-negative and less than the size of the collection.”

This is difficult because I don’t have much context. But just to make sure the list needs to have a type like:

    public List<GameObject> ItemList = new List<GameObject>(); 
    ItemList.Add(RedPotion); 
    ItemList.Add(BluePotion); 
    ItemList.Add(GoldPotion); 
    Instantiate(ItemList[2], Item2Location);