Use the templates

Try the following code in the constructor of Custom Elements

const template = document.getElementById("details-page-template");
const content = template.content.cloneNode(true);
this.appendChild(content);    

Did it work? Now try to move that code to connectedCallback().