enable and disable global volume

Hi, I'm trying to enable and disable Global volume when i'm pressing a key but it's not working and it's making unity crash. I was doing it with post processing but with urp i cant manage to find how to do it. How can i access to the component to enable it and disable it in a "if" ?