Destroy delay not working

I used

Destroy(gameObject, 10);

but the game object is destroyed immediately.

The game object is a children in other game object and I call destroy method then immediately the parent object is disabled - so does this effect it?

Heyyo!
If the parent is disabled/destroyed, the children would be as well.

So in this case, if the parent is disabled, that will make the child object disappear/be disabled from the rendered view (but it’s still in the hierarchy), and also stop the Destroy() timer on the child.
It would be recommended to have the children object to be unparented if you want to keep the children and parent running separately. You could also have the children to be outside of the parent from the beginning, or have a separate instance of the children, depending on your use case!

Hope that helps!