If you see a null or nil instance in an error, it means the following:
The variable or object just before the method (in the same error) doesnt exist.
This means that you either moved or renamed the nodes in your scene and did not update the names in your code.
So I would recommend using @export instead of using the tutorial way with $"something/something".
Your new code would be something like:
@export var main_menu : type
@export var play_menu : type
@export var player_select : type
func _ready() -> void:
main_menu.show()
play_menu.hide()
player_select.hide()
Dont forget to replace type with the correct node type that you used for these.