When you upgrade to the latest version what happens to your current work in 3.1.5? And should I upgrade before I upgrade my operating system to Mojave?
Upgrade Scrivener first, otherwise it will crash when you attempt to open 3.1.5 under Ventura, and you will be sad.
Your work is stored separately from the Scrivener application and should be right where you left it. Make sure you know where it’s located in Finder, though, as the Recent Projects menu may not be trustworthy. And of course taking an extra backup is never a bad idea.
Your projects are completely separate from the Scrivener app, so upgrading your operating system and version of Scrivener doesn’t affect the projects. The only thing that might happen is that the “Recents” menu is depopulated, so you will have to open your projects by using File → Open, or from the “Open an existing file…” dropdown menu at the bottom of the dialog when you start Scrivener, and navigating to where you have saved them, or alternately using Finder to locate them and double clicking on them.
If you don’t know where you have saved them, *.scriv in Spotlight will find them.