Make use of resources from search machines or steps in the following
https://helpx.adobe.com/photoshop/kb/file-recovery-photoshop.html
https://download.cnet.com/Recuva/3000-2242_4-10753287.html
https://photoshop.recoverytoolbox.com/
# Open the “Window” menu and choose “History” to display the History panel. Locate the “Flatten Image” step in the list of history states.
# Click on the history state just before “Flatten Image” in the History panel. Undoing the flattening process brings back your layered composition…
# Press “F7” or open the “Window” menu and choose “Layers” to open the Layers panel by pressing “F7” or choosing “Layers” from the “Window” menu. Verify that your document contains the layers you expect. If necessary, step back farther in the file’s history to reach the point at which you want to reclaim your document.
# Open the “File” menu and choose “Save As.” Change the name of your document and save the file.