Following the initial idea of @Scott, you can do it using a script and an action.
The Script is not mine. I just change it to save in png. The original save in tiff.

Open the script file and edit the output folder:
This line: "var folderPath = Folder("D:\Temp");"
Put the script file in the Scripts folder.
C:\Program Files\Adobe\Adobe Photoshop 2021\Presets\Scripts\Photoshop
AddNumberPng.jsx
Create an action with - history panel>menu>step forward, and File>scripts>AddNumberPng

You must draw in a transparent layer with no background layer if you want the transparency to be preserved.
Assing a shortcut to that Action. In my test, I assigned the F2 key.
Now go to the history state before the state you want it to save the first png and hit F2 then keep hitting it until you finish all the history states.

More: In additional to @Wolff's comment.
If the real wish is to save every separated Layer to png's, you can record the action just for the Script.
Then you can use Alt+leftclick the layer eye icon to hide all the other layers and hit F2(to play the action). Repeat it to all layers.
About the code: My teacher said it is better you write it instead of copy/paste it. This way we can understand what is going on. But if someone really wants this code in text, I can provide it later.

As I`m not a bad person, here is the clean code:
#target photoshop
app.bringToFront(); //Leó 22/02/2018 tiff to png exporting extension changed.
main();
function main(){
if(!documents.length) return;
var folderPath = Folder("D:\Temp"); //You can change this directory
if(!folderPath.exists) {
alert("Output folder does not exist!");
return;
}
var fileName = "filename"; //You can change the filename here
var fileType = "png";
var fileList = new Array();
var newNumber=0;
var saveFile='';
fileList = folderPath.getFiles((fileName + "*." + fileType));
fileList.sort().reverse();
if(fileList.length == 0){
saveFile=File(folderPath + "/" + fileName + "0001." +fileType);
activeDocument.saveAs(saveFile, SaveDocumentType.PNG, true, Extension.LOWERCASE);
}else{
newNumber = Number(fileList[0].toString().replace(/\....$/,'').match(/\d+$/)) +1;
saveFile=File(folderPath + "/" + fileName + zeroPad(newNumber, 4) + "." +fileType);
activeDocument.saveAs(saveFile, SaveDocumentType.PNG, true, Extension.LOWERCASE); }
};
function zeroPad(n, s) {
n = n.toString();
while (n.length < s) n = '0' + n;
return n;
};