Random Spawning stars

I want to have stars spawn randomly but cant seem to find a way to do so. here is my current star spawning code (its just the one from the first game tutorial)
stars = this.physics.add.group({
key: ‘star’,
repeat: 11,
setXY: { x: 12, y: 0, }
});
any help would be appreciated

RandomRectangle() is one way: