How to change Bounciness of Physics Material

Hi
I am trying to change the value of the Bounciness of my Physics Material named as Bouncy. eg. from 0.8 to 0.1
Is there a way in code to do this?
I have tried the following lines of code but without luck

if (Input.GetKey(“b”))
{
// physicsMaterial.Bouncy.Bounciness= 0.1;
// collider.material.Bounciness = 0.1;
collider.bounciness = 0.1;
// ball.collider.bounciness = 0;
}

I have even tried changing the Physics Material from Bouncy to Bouncy2

public GameObject Bouncy;

Bouncy.renderer.material = Bouncy2;

Can someone help me with this please as I have been googly and not finding the solution.

Thank you
Sam

public PhysicsMaterial Bouncy2;
collider.material = Bouncy2;