How to make an animation with a transparent background in krita?

Which version of Krita are you using?
Even if layers are “animated” it seems you don’t have keyframes :thinking:

The first thing is to create keyframes.

In timeline, right-click and then “Create blank frames”

On each frame, you’ve to draw the content that will define animation

At the end, in menu File, you have to render animation and choose WebM format

Here’s complete animation tutorial for beginners:

Grum999