Collection variables are set in the UI and can be accessed using a script. If you want to create or set variables in a script and access from other requests, you can use Runtime Variables: https://docs.usebruno.com/get-started/variables/runtime-variables