There are no BPMN symbols to declare variables. So having it visible directly in the graphical model is not possible.
But you could use Script (either as a Script Task or as any type of Listener) to declare variables and give them to the process context. You can define the script in the properties panel of the Camunda Modeler and the Script can be stored within the model. Then your script would be visible in the corresponding XML. So it would be directly in your model
Normally we recommend to store the Script externally too. It is easier to maintain. Further the engine creates new versions of your process if the XML changes. This said if you have your Script in the XML you would get a new process version whenever your Script changes. This can be sometimes not intended because the logic of the model stays the same.