Embed StencilJS webcomponent

Hello everyone.
I built some webcomponents using stenciljs, but I realized that if I use them inside internal events don’t work and if I use document.querySelector inside the component I always get null.
Given that the webcomponents I created work perfectly in a normal html page.

Is there a particular method that I have to use to import webcomponents?

You need to share more code on what doesn’t work, what is in web component. It is not clear at all what is the issue