AngWay i clicked on the duress pin to open it and it asked for the pin i thought that i just had to enter it in order to get to the settings so i could change the pin and stuff instead it wiped my whole phone and everything
I can see how that might have confused you, and I'm sorry that happened to you.
Just a friendly reminder for in the future, every time you are asked to authenticate yourself within System settings, you are always supposed to input the current PIN/password you have setup to unlock your phone, and never the duress pin/password, even in the menu to setup the Duress feature. The only time you enter the Duress pin/password without the intention to wipe your phone is when you are first setting up the feature and confirming the input.
That being said, the Duress feature in intended to function anywhere authentication is requested, whether it be the lockscreen, System Settings, Private Space, etc.
See here: https://grapheneos.org/features#duress
GrapheneOS provides users with the ability to set a duress PIN/Password that will irreversibly wipe the device (along with any installed eSIMs) once entered anywhere where the device credentials are requested (on the lockscreen, along with any such prompt in the OS).
Duress PIN will also wipe the device when entered as the two-factor fingerprint unlock PIN but not currently when entered as the SIM PIN.