Rendering a region fo a theme programmatically
Using the block.repository service you can get an instance of the BlockRepository class.
You can then call the getVisibleBlocksPerRegion method on it which will return an associative array BlockInterface[][] (first key is the region name, second key is the block ID).

You will probably need to change the active context if some of these blocks only appear certain conditions.