Getting data from other scene or script

Sorry, I am new to unity. I am making a game with my friends. The game has a menu and there is a setting button that can set such as sound on / off , and quality etc. And in the game play screen there is also a sound on / off button to mute the music.

My question is how can I save and get the status about it is sound on or sound off? Because if the player press the sound off button in the menu page, that means they want to mute the sound and they will not want to press it again on the game play screen. So when they press the sound off button in the menu page, music or sound should be off or mute in the game play screen when they playing.

But how can I get the status of sounds are on / off?

Hope someone can help me ! Thank You !

You can save persistent data using Player Preferences.

As for saving state data in your game, one paradigm is to create a management script that calls “DontDestroyOnLoad()” in its start method, and place the script on an empty game object that is created in the first scene you load. The script can then provide interfaces (like setVolume, getVolume) for other scripts to access. If you make everything static in the script, it becomes even easier as you can access those static interfaces without having to have a game object instance in any scene. There are of course other ways to solve it. Instead, you might create an Audio script that specifically handles saving/retrieving audio volume.