Spawning Objects at a specific height of a mesh

Hey so I have followed some tutorials to make this Terrain generator but now I would like to add some objects like trees & houses on top of it at specific heights, how should I go about doing that?

You can raycast down at the terrain to find a specific contact point. Look up raycasting tutorials / example code.

You can even deform the terrain around each object so it looks more natural: