Cannot set environment variables when using Windows Terminal

When I am trying to set environment variables using Windows Terminal with command “set test1=value1” I get no errors but when I try to check all env. variables calling “set” I get the following prompt:

cmdlet Set-Variable at command pipeline position 1
Supply values for the following parameters:
Name[0]:

I read that when using powershell (or its byproducts) you set env. vars using this:

$Env:test1 = "value1";    

I want to set the variables so that on my backend in custom-environment-variables.json
I can store a name by which config can extract it using config.get(“test”);

custom-environment-variables.json:

{
    "test": "test1",
}

But everytime I try this, it says Error: Configuration property “test” is not defined

Doing the same procedure but in cmd I get no issues whatsoever. Any ideas what might be causing this?