add the instantiated object to the list

I instantiate an object with photonNetwork, in the function below I sync a 2d string and add it to the list, but it gives an error on the line I want to add to the list

private void InitialSetup1()
    {  
        AddPiece(redGolem, red, 6, 6);
        AddPiece(redEye, red, 4, 6);
        AddPiece(redMuc, red, 7, 6);
    //
    }

public void AddPiece(GameObject prefab, Player player, int col, int row)
    {
  Vector2Int gridPoint = Geometry.GridPoint(col, row); 
   GameObject pieceObject = Instantiate(prefab, Geometry.PointFromGrid(gridPoint), Quaternion.identity, 0, null);

player.pieces.Add(pieceObject);
 pieces[col, row] = pieceObject;
 
     
        return pieceObject;
    }

Any idea?