Best way to detect signals to instantiate a different scene and call functions from it

Godot Version

4.3

Question

I am trying to create a simple Minesweeper. I have a “menu” scene, where you select the difficulty with buttons and a “game” scene.
What I want to do is, when one of the difficulty buttons is pressed:
a. Set up the field with a certain amount of tiles (based on the difficulty). Currently, my field is a TileMapLayer
b. Actually open the “game” scene

What is the most optimal way to send the signal from a button in “menu” to the TileMapLayer in “game”?
Also, how do I handle the setting up of the field? Currently, I can only set it up using set_cell in the “ready” function, not in the setup function I specifically wrote for it.
Screenshots included, thanks in advance

Functions for button signals

Function for setup

You can’t use Node.get_node() function with the file path, it has to be tree node path, this line probably generates an error for you.

You need to reference the menu either by the node path as mentioned in the link above, or by @export-ing the variable and assigning the reference in the inspector.