In app designer variables are stored in workspace as in .m files (Since app designer uses local functions to perform tasks).
If you want to use variables in multiple functions/buttons of the app designer
properties (Access = private)
var1; % variable 1
var2; % variable 2
end
%% accessing variables elsewhere in the app designer functions
var3 = app.var1-app.var2; % computing variable 3 using defined variables 1 and 2 earlier
For Guide on app designer you may follow
https://www.youtube.com/watch?v=iga-YS6VbyE