What program are you using? if its aseprite then they have an "export to spritesheet" option that makes things easy (and if you add tags to your animations by highlighting the animation and right clicking and selecting "add tag" you can choose to seperate them into layers with each layer being its own tag/animation)