How should i implement a procedurally generated space background?

So, i have a 2D game in which you control a spaceship flying through space. There are no boundries to the space and you can move in any direction, the camera will follow.

I have the camera bakground set to pitch black but it looks so boring.
Hence, I am going to add stars / galaxies / (nebulas?) to the background
(I will make prefabs with sprites of theese things and parallax, but i can do that myself)

I Just wonder, how should i go about generating these features, without loading everything at once and unloading stuff when it’s far away, and still have the same stars visible even when you have an area and come back again?

An idea i have is to load chunks of space when you get near them, and have spawn the features in the chunk randomly with a seed based off the position of the chunk. Is this a good idea? How could i implement this?

Thanks in advance :slight_smile:

This is probably what you want, its really easy to do.
And it’s a really cool effect.