It can be set up via the Photoshop menu and preferences and history log. Go to the history log check box and set that to ON. Super useful for many purposes such as time keeping, client's work etc
You can save it to the meta data for the document. You can also save the data to a text file and the text file is for all documents, the meta data is for the document. You can also save it to both. If you select text then you have to set up a text file (such as on the cloud). The data is sessions only or concise or detailed. The text file 'Photoshop edit log' can be stored on an external hard drive if you wish (cloud etc)
The information stored can be quite fascinating though perhaps detailed displays too much as it gives a huge amount of data about the type, shapes etc. Concise and sessions perhaps are more useful for accounting purposes in that it tracks the work done etc.
The sort of information stored in the file for the sessions only is
2021-06-08 18:38:37 File Untitled-1 closed
2021-06-08 18:38:41 File Untitled-2 closed
2021-06-08 18:38:41 quit
2021-06-08 18:38:51 launched
A little more information is displayed such as the file name (as before) along with the tools etc used but not much detail
2021-06-08 18:40:05 launched
2021-06-08 18:40:13 File Untitled-1 opened
A lot more information is given and some of it very useful in the understanding of how the application works
2021-06-08 18:41:50 launched
2021-06-08 18:41:58 File Untitled-1 opened
Make
New: document
false
false
Mode: RGB color mode
and much more and that was from a few commands so you can see the detailed file can fill up very quickly
You can simply go to the preferences and history and turn it off. You can also manually edit the file as well.