How do I enable a script/bool with a button?

Is it maybe this?

Unity button onclick function script callback gameobject notes:

For sliders and dropdowns and other value-returning UI elements: