After Toolkit > Modifiers > Layers to PNG
Export your After Effects layers to PNG files
Export your layers to individual PNG files with transparency.Layers to PNG exports your selected layers to PNG files into the directory of your choice.
Layers to PNG - Quickstart Guide
Open your After Toolkit, select your layers, and click on Layers to PNG.The export process can skip some layers based on their visibility, shy or locked states.
The last checkbox, Import exported PNGs to Project, allows you to automatically import the exported PNG files into your current project.
After clicking on OK, select your destination folder, where the PNG files should be saved, and wait until the export process is over. The generated PNG files keep the original layers' transparency and are named after their original layer.
If you select layers before launching the script, it will only export your selected layers. If no layer is selected, it will export all the layers in your current composition.