Where do you want to create the page? @Pascalmh is right, you need to pass the UID, not the slug (the difference is that the UID is always the same, the slug can be different per language in a multi-lang environment).
So your code should look like this:
$newPage = site()->pages()->create('a-new-slug', 'default', ['title' => 'A title']);
This will create a new first level page in the /content folder. But it is all explained in the docs.