How to use output variables from one button in another button?

I’m still finding it difficult, Could you please specify where and how do I initialise the session state and set it to True even after pressing the other button to return the result?