I have an issue with my build mechanic

I developed a build mechanic using RayCast, but since I can’t cast the ray considering the size of the object I’m spawning, it ends up spawning inside or underneath other objects. How can I fix this issue?

Here’s a video of the issue I’m experiencing

Sorry my English is bad :frowning: