You can think of the WAL file as a temporary workspace for the project.
The full gory details are described here: https://sqlite.org/wal.html
On some platforms there’s also a SHM file, which has the same lifetime as its associated WAL file.
Normally you won’t see these files, though you may if you open a project on your Desktop, have a “tidy” Desktop, and make the Audacity window small enough, or if you look in your file browser while the project is open.
There should be some information in the Audacity manual about these files - not sure if there is yet.
The basic rule is: Don’t mess with them.