Detect on instantiate if object is instantiated in terrain

Hi, I have an object with a box collider which I instantiate where I click on my terrain. Everything works fine except that it’s instantiating in the mountains. I have added a box collider on the object but I don’t know where to go from here to make it not instantiate when the box collider is colliding with my terrain.

Thanks in advance!

You instantiate it from raycast hit is it true ? If so, just add some value to y axis.

Vector3 spawnPoint = hit;

spawnPoint.y += 3f; //or any value

//Now just use spawnpoint as Instantiate position (2 argument)