In GameMode class. If you want it to be persistent between the level (GameMode resets on level restart and switch) use GameInstance instead.
If you want to keep the variable state between the runs of the game you either by saving games
Or saving variable in ini config by flagging variable as “Config” in property editor (hidden in advance config, arrow at bottom of category). Hover over config to see tooltip explaining how it works. Note that ini config is easily editable by user.
You got more options in C++, you can load and save config on depend and do more specific config writing and reading in GConfig, as well you can write things to file to save