Unable to set Config() (v2024)

I am trying to set a config which I can use later. So I try to set the config at Global Code
Config(“uname”,“newname”);

I got an error
Fatal error: Uncaught Dflydev\DotAccessData\Exception\MissingPathException: No data exists at the given path: “uname” in xxxxxxxxx\vendor\dflydev\dot-access-data\src\Data.php on line 132
I can get the config array by $check = config();

Please guide me how to set the config in PHPMaker 2024

If the setting does not exist, you should use:

Config()->set(“uname”,“newname”);

Thanks Sir, it is working by using Config()->set

I wnat to know that is it safe to share the api token in the Config()->set from the Global Code Server Script.