unity – Assigning a shader material on runtime issues

I’m facing a problem once assigning a shader material on an android build.

IEnumerator LoadMat()
    {
        ResourceRequest resourceRequest = Resources.LoadAsync<Material>("Solid_frame_inside_under");
        while (!resourceRequest.isDone)
        {
            yield return null;
        }
        if (resourceRequest.isDone)
        {
            Material OutlineMaterial = resourceRequest.asset as Material;
            rend.material = OutlineMaterial;
            Debug.Log("Material Loaded");
        }

    }

Im using this hopefully correct function to assign an outline shader material to 10 game objects instantiated in the scene.

This enumerator gets called on Awake, but when its changing the material to that one, unity freezes and then it continues the game with the outline shader material assigned and working. Am i doing something wrong in the async function?

This function is in a script that gets attached to the game objects as soon as they are instantiated. The function that does that is this which is in another game object.

 for (int i = 0; i < selectedArray.GetLength(0); i++)
        {
            spawnedGameObjects(i) = new GameObject();
            spawnedGameObjects(i).gameObject.name = "puzzlePieces" + i;
            spawnedGameObjects(i).gameObject.tag = ("puzzle");
            spawnedGameObjects(i).gameObject.AddComponent<ClickOn>();
    }

Behavior is as follows, i run the game on my mobile (android) scene starts ,debugs come back and my timer is stuck at 5 for a couple of seconds and game is not playable and then once the outlines are applied it starts counting down.