EditorSceneManager.SaveScene(SceneManager.GetActiveScene());
It is impossible to save a unity scene at runtime but if you mean like saving a world that you can play again then use json files