Scaling Object to fit between two Vector3 points

Hi. I’m new to unity and still learning.
I’m trying to position myPrefab object between two Vector3d points
and scale it to fit between them.

My issue is that
when i try to scale object in a script. Object does not fit.
But when i change scale in Prefab Inspector tab it works…
I want same result by scaling object in a script.
Would you guys let me know what i am missing?

P.S : sry if my english is silly. I dont use english that much…