More efficient method to programming buttons?

So I have multiple menus that I want to disable and enable, first method that came to me is just creating several Canvas objects and then setactivefalse setactivetrue the appropriate ones onclick.

Then I realized it’s a lot of lines if I were to do it that way. Is there a more efficient method of doing this? The buttons aren’t dynamically generated, they’re just created in editor.

Parent all of the buttons for each ‘page’ under their own GameObject. Then you can enable or disable them all in one go.