After each execution of what? The game? A certain function?
But yeah, sure, just change the buildings position
to random values:
const MIN = Vector3(-150, -100, -50)
const MAX = Vector3( 150, 100, 50)
func _ready():
randomize() # change the random seed each time the programm runs
for each building in get_tree().get_nodes_in_group("buildings"):
# generates random float betweeen MIN_X|Y|Z and MAX_X|Y|Z
var x = rand_range(MIN.x, MAX.x)
var y = rand_range(MIN.y, MAX.y)
var z = rand_range(MIN.z, MAX.z)
# set the buildings position using the 3 random values
building.position = Vector3(x, y, z)
Note: The code above assumes that all your buildings are already part of the scene and have been added to group called "buildings" (exactly like this, case-sensitive!).
Given how broad your question is, it's quite possible that this is not what you want though. In which case I'd recommend you research "procedural generation" (which is vast and complicated area!) and come back with a more refined question.