How to create instance of Material unity

Various tutorials and the unity documentation shows that using renderer.material creates an instance of that material, but my gameobject isn’t doing this and is editing the shared material instead that various game objects are using. In case it helps, these game objects sharing the material are all an instantiated prefab. Help is appreciated.
** public float dissolveDuration = 2;
public float dissolveStrength;

private void Update()
{
    if(EnemyRPSmanager.dissolve == true)
    {
        StartCoroutine(Dissolver());
        
        
    }
}
public IEnumerator Dissolver()
{
    float elapsedTime = 0;

    Material dissolveMaterial = GetComponent<Renderer>().material;

    while(elapsedTime < dissolveDuration)
    {
        elapsedTime += Time.deltaTime;

        dissolveStrength = Mathf.Lerp(0, 1, elapsedTime / dissolveDuration);
        dissolveMaterial.SetFloat("_DissolveStrength", dissolveStrength);

        yield return null;
    }
}**

Instead of material Material dissolveMaterial = GetComponent<Renderer>().material;, which makes dissolveMaterial a reference to the material (so it will change it), you need to create a new material.

Using Material dissolveMaterial = new Material( GetComponent<Renderer>().material ); will create a new material (not a reference to the old material) that you can use. In order to use the new material, you must set the renderer to use it. So on the next line add GetComponent<Renderer>().material = dissolveMaterial