What's the most efficient way to create Menus with many Sub-Menus?

Godot Version

v4.3.stable.official [77dcf97d8]

Question

What's the best way to create Menus with many Sub-Menus?

I prototyped a project that lets me simulate a browser so I can click buttons and links to access various subpages and go back to the page I clicked from.
I achieved this by hiding/unhiding nodes from button signals, this isn’t very efficient and is pretty tedious so what would be the best way to manage so many pages and subpages and their respective “return” buttons?
The script was a long list of button functions so that wasn’t the best way, any tips would be appreciated, thanks :slight_smile:

If you need more details to understand my situation, ask away :smiley: