Why does Unity not already do this? I don't know.
Automatically saves the currently open scene after a configured amount of time.
You can install this in 3 ways.
https://github.com/WeatherElectric/UnitySceneAutoSave.git
.unitypackage
in the latest release.After it is installed, a scriptable object will be created in the assets folder. Adjust the settings within the scriptable asset to your liking.
You can then put that asset anywhere in your project.
If there is more than one, it'll load the first one it finds and delete the extras.