Create children with num

Hi there!
I have a function creating a new child to a page for each item of an array

$newProduct = $page->createChild([
    'slug' => $product['handle'],
    'template' => 'product',
    'draft' => false,
    'content' => $data
]);

But I want these pages to be automatically listed and not unlisted as they are by default. If I add the option 'num', it doesn’t work. If I use the function changeNum() on the newly created page, it doesn’t work either.
How would you achieve this?
Thanks in advance

This should do the job: https://getkirby.com/docs/reference/objects/page/sort

It works perfectly, thanks a lot!