I drafted a pattern for you that comes in girl’s sizes 2-12. If you already have a legging pattern that you like or if you need a different size, you can probably follow my instructions with that pattern too.
Turn the leggings right side out and cut a piece of elastic that fits the child’s waist. If you don’t have the intended child close by, measure the top of the leggings and cut a piece that is 1-2” less.