Meshes are not being centred on the pivot point of the transform

I am creating a tile object using the following code.
For some reason, the mesh whenever I click play is always offset from the pivot point of the transform.

The green outlines are my BoxColliders. They are at the correct positions, however the visible meshes themselves aren’t. I’m not entirely sure why they aren’t in the same position

Is there a way to make it so that the meshes are at the same position as my BoxColliders and the pivot point of my transform?

private GameObject GenerateSingleTile(float tileSize, int x, int y)
{
    GameObject tileObject = new GameObject(string.Format("X:{0}, Y:{1}", x, y));
    tileObject.transform.parent = transform;

    Mesh mesh = new Mesh();
    tileObject.AddComponent<MeshFilter>().mesh = mesh;
    MeshRenderer meshRenderer = tileObject.AddComponent<MeshRenderer>();

    Vector3[] vertices = new Vector3[4];

    vertices[0] = new Vector3(x * tileSize, 0, y * tileSize);
    vertices[1] = new Vector3(x * tileSize, 0, (y + 1) * tileSize);
    vertices[2] = new Vector3((x + 1) * tileSize, 0, y * tileSize);
    vertices[3] = new Vector3((x + 1) * tileSize, 0, (y + 1) * tileSize);

    int[] triangles = new int[] { 0, 1, 2, 1, 3, 2 };

    mesh.vertices = vertices;
    mesh.triangles = triangles;

    Color newColor = Color.clear;
    meshRenderer.material.color = newColor;

    tileObject.AddComponent<BoxCollider>();

    // Debug logs for inspection
    Debug.Log("Local Position Before: " + tileObject.transform.localPosition);
    Debug.Log("Mesh Bounds Center Before: " + mesh.bounds.center);

    // Set the position based on the center of the mesh
    mesh.RecalculateBounds(); // Ensure bounds are up-to-date
    Bounds bounds = mesh.bounds;
    tileObject.transform.position = new Vector3(bounds.center.x, 0, bounds.center.z);

    // Debug logs for inspection
    Debug.Log("Local Position After: " + tileObject.transform.localPosition);
    Debug.Log("Mesh Bounds Center After: " + mesh.bounds.center);

    tileObject.GetComponent<BoxCollider>().center = Vector3.zero;

    return tileObject;
}

I use it to create an 8x8 grid (chessboard) with this code

private void GenerateChessBoard(float tileSize)
{
    tiles = new GameObject[TILE_SIZE_X, TILE_SIZE_Y];

    for (int x = 0; x < TILE_SIZE_X; x++)
    {
        for (int y = 0; y < TILE_SIZE_Y; y++)
        {
            tiles[x, y] = GenerateSingleTile(tileSize, x, y);

        }
    }
}