Problems with mesh modification

So I’m making an Island generation script, and it works fine with the default unity plane, but when I use a higher res plane made in blender, it gets kinda funky.

Here is the code:

using UnityEngine;
using LibNoise;

public class IslandGen : MonoBehaviour
{

    Vector3[] verts;
    int[] tris; 
    Vector2[] uv;
    
    Mesh mesh;
    MeshCollider col;
    NoiseGen p;

    void Start()
    {
        mesh = GetComponent<MeshFilter>().mesh;
        col = GetComponent<MeshCollider>();
        verts = mesh.vertices;
        tris = mesh.triangles;
        uv = mesh.uv;

        DeformMesh();
        UpdateMesh();
        
    }

    void UpdateMesh()
    {
        mesh.Clear();
        mesh.vertices = verts;
        mesh.triangles = tris;
        mesh.uv = uv;
        mesh.RecalculateNormals();
        col.sharedMesh = mesh;
    }
    void DeformMesh()
    {
        for (int x = 0; x < 100; x++)
        {
            for (int z = 0; z < 100; z++)
            {
                verts[x].y = Noise.GetNoise(x, 0, z);
            }
        }
    }
}

Where the x and z in the for loops are proportionate to the amount of verts in the mesh. Unfortunately the unity default plane does not have enough verts for any decent terrain. And I do not want to have to make the mesh from scratch, been there, decided it would be much simpler just to use a premade plane. Especially for a middle-beginner coder. So I have tried 200 in the loops, 400, as that is the displayed amount in blender, and I’m still trying to work it out. If someone could tell me if I’ve got a bit of code woring, that would be fantastic.

The plane from blender:

The plane with code applied:
1461637--79733--$mQjJmpG.jpg

How its supposed to look, and looks with the unity primitive:

Got it! I had to change the Z axis not the Y! I though it was something to do with that!