If you're not using a gallery, you can put the "Set()" function in the "OnSelect" property of your buttons.

Here I created three buttons and one label. The buttons properties are:
OnSelect:UpdateContext({selectedButton:Self.Text})
Color:If(Self.Text = selectedButton;RGBA(56; 96; 178; 1);Color.White)
Fill:If(Self.Text = selectedButton;Color.White;RGBA(56; 96; 178; 1))
And the label's properties are:
Text:selectedButton
When clicking on a button, it sets the variable "selectedButton" to the button's text. The "If()" in the "Color" and "Fill" properties of the buttons helps visualize which button has been selected. The label gives us an insight on the variable's value.
If you're using a gallery, the formulas are a bit similar.

The gallery's property are:
Items:["Bouton 1";"Bouton 2";"Bouton 3"]
OnSelect:UpdateContext({selectedButton2:Gallery19.Selected.Value})
The buttons' properties are:
Color:If(Self.Text = selectedButton2;RGBA(56; 96; 178; 1);Color.White)
Fill:If(Self.Text = selectedButton2;Color.White;RGBA(56; 96; 178; 1))
And the label's properties are:
Text:selectedButton2
Note that with a gallery, the button's "OnSelect" is not used. That's because the gallery already has a "OnSelect" property which we can use here whenever the user selects an item from the gallery.
Also, I've used "UpdateContext()" in my examples, however, the variable is screen-wide and not app-wide.
If you want more control on the button's text, you can set a global enum variable. This will help you set the button's text only once in your app, avoiding the case where you'll have to search for every case where the button's text value was used.
OnStart:Set(buttons;{Button1:"Bouton 1";Button2:"Bouton 2";Button3:"Bouton 3"})
