I generated many spheres and unity is so slow and laggy. What should I do?

var vertices = new List();

GameObject mol = new GameObject();
mol.name = "Mol";
mol.transform.localScale = new Vector3(1, 1, 1);
mol.transform.position = new Vector3(0, 0, 0);

Mesh mesh = new Mesh();
mesh.vertices = vertices.ToArray();

mol.AddComponent<MeshFilter>();
mol.GetComponent<MeshFilter>().sharedMesh = mesh;
mol.AddComponent<SphereCollider>();
SphereCollider coll = mol .GetComponent<SphereCollider>();
coll.radius = 0.5f;

mesh.RecalculateNormals();
mesh.RecalculateBounds();

  for(int i = 0; i < vertices.Count(); i++)
        {
            GameObject ins = Instantiate(obj, vertices*, Quaternion.identity);*

ins.transform.SetParent(mol .transform);
}
I have a list of vertices of a molecule and I have to generate a sphere to each vertices (in order to generate the molecule). In 1 molecule , there are more than 7,000 vertices which means that I have to generate at least 7,000 sphere. So the unity is so slow and laggy.
=> What should I do to generate many spheres without making unity slow and laggy?
=> Another problem is I set the localScale and position of “mol” but it’s not working. The spheres are generated at the vertices position with its original scale.

Luckily for you unity is implementing a new system called the “Entity Component System” which is perfect for this kind of unity right now unity definitely cannot handle a number that high with each being fully rendered objects. I would sincerely recommend watching this video as it would show you exactly how to setup ECS just substitute the tacos for your spheres and change the headings to whatever you need and your done.

About your first question, maybe you should use the coroutine function like this:

IEnumerator InstantiateDelay (int perframeCreateNum) {
    int count = 0;

    for(int i = 0; i < vertices.Count(); i++)
    {
        GameObject ins = Instantiate(obj, vertices*, Quaternion.identity);*

ins.transform.SetParent(mol .transform);

if (count < perframeCreateNum){
count++;
}else{
count = 0;
yield return 0;
}
}

yield return 0;
}
And call this coroutine function like this: (the attribute means how many objects you want to create in one frame)
StartCoroutine("InstantiateDelay ", 100); // 100 is just a example.