I'm making an open world game and for the procedural generation I need to change the layout size, but how do I do it?
Can't be done. You can't change the layout size at runtime.
What you can do is have multiple layouts with doors between them. An example that comes to mind is Evoland and Stardew Valley.
Or you can have a giant layout and generate your world inside it.
You didn't give much informations, so I'm afraid I can't help you further until you do.