Add prefabs randomly, endless runner

Hey, I’m making an endless runner. I made some prefabs which are pieces of the map spawning randomly ( to have a different map each game).
My problem is that I can’t figure out how to place the spawning prefab so that it connects well with the previous prefab.
I new to Unity so I’m wondering what would be the best option to place it?

On way (which is not very dynamic, but robust and simple) is to add “satellite” empty gameobjects around the main gameobject (as children). These satellite transform.positions values (in world space) would indicate the correct placement of connecting gameobjects. You can also indicate the rotation if needed with these satellite points… hope this helps.