How to make prefabricated levels that are procedurally generated on grid as the character gets close?

I want to create different levels and have them generated on a grid based on character location. Say levels of 1000units then have them generated randomly when the character gets near the edge of the 1000unit square.

Pretty much any knowledge on how to create procedurally generated content would be much appreciated.

Also anything on creating prefabricated levels that you spawn. Like would i make a bunch of class blueprints of 1000 units square?